This commit is contained in:
karl 2025-03-26 15:58:58 -04:00
parent e6fe47bbe1
commit e8d5b6e789

View File

@ -1,31 +1,51 @@
export type SortFilterItem = {
title: string;
slug: string | null;
sortKey: 'RELEVANCE' | 'BEST_SELLING' | 'CREATED_AT' | 'PRICE';
reverse: boolean;
};
title: string
slug: string | null
sortKey: 'RELEVANCE' | 'BEST_SELLING' | 'CREATED_AT' | 'PRICE'
reverse: boolean
}
export const defaultSort: SortFilterItem = {
title: 'Relevance',
slug: null,
sortKey: 'RELEVANCE',
reverse: false
};
reverse: false,
}
export const sorting: SortFilterItem[] = [
defaultSort,
{ title: 'Trending', slug: 'trending-desc', sortKey: 'BEST_SELLING', reverse: false }, // asc
{ title: 'Latest arrivals', slug: 'latest-desc', sortKey: 'CREATED_AT', reverse: true },
{ title: 'Price: Low to high', slug: 'price-asc', sortKey: 'PRICE', reverse: false }, // asc
{ title: 'Price: High to low', slug: 'price-desc', sortKey: 'PRICE', reverse: true }
];
{
title: 'Trending',
slug: 'trending-desc',
sortKey: 'BEST_SELLING',
reverse: false,
}, // asc
{
title: 'Latest arrivals',
slug: 'latest-desc',
sortKey: 'CREATED_AT',
reverse: true,
},
{
title: 'Price: Low to high',
slug: 'price-asc',
sortKey: 'PRICE',
reverse: false,
}, // asc
{
title: 'Price: High to low',
slug: 'price-desc',
sortKey: 'PRICE',
reverse: true,
},
]
export const TAGS = {
collections: 'collections',
products: 'products',
cart: 'cart'
};
cart: 'cart',
}
export const HIDDEN_PRODUCT_TAG = 'nextjs-frontend-hidden';
export const DEFAULT_OPTION = 'Default Title';
export const SHOPIFY_GRAPHQL_API_ENDPOINT = '/api/2023-01/graphql.json';
export const HIDDEN_PRODUCT_TAG = 'nextjs-frontend-hidden'
export const DEFAULT_OPTION = 'Default Title'
export const SHOPIFY_GRAPHQL_API_ENDPOINT = `https://${process.env.SHOPIFY_STORE_DOMAIN}/api/2023-01/graphql.json`