From e8d5b6e789372fd7113f1d5177f56110c19b2c3f Mon Sep 17 00:00:00 2001 From: karl Date: Wed, 26 Mar 2025 15:58:58 -0400 Subject: [PATCH] bug fix --- lib/constants.ts | 54 +++++++++++++++++++++++++++++++++--------------- 1 file changed, 37 insertions(+), 17 deletions(-) diff --git a/lib/constants.ts b/lib/constants.ts index 56bc6cd12..d62a1116a 100644 --- a/lib/constants.ts +++ b/lib/constants.ts @@ -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`