categories working

This commit is contained in:
Oliver Heywood
2021-10-11 10:11:19 -05:00
parent 3a3eb38ecc
commit b03e6f0271
3 changed files with 4 additions and 4 deletions

View File

@@ -25,7 +25,7 @@ const getProducts: ProductsEndpoint['handlers']['getProducts'] = async ({
if (search) { if (search) {
url.searchParams.set('search', search) url.searchParams.set('search', search)
} }
if (categoryId && Number.isInteger(Number(categoryId))) { if (categoryId) {
url.searchParams.set('categoryID', String(categoryId)) url.searchParams.set('categoryID', String(categoryId))
} }

View File

@@ -2,7 +2,7 @@
"name": "nextjs-commerce", "name": "nextjs-commerce",
"version": "1.0.0", "version": "1.0.0",
"scripts": { "scripts": {
"dev": "NODE_OPTIONS='--inspect' next dev", "dev": "next dev",
"build": "next build", "build": "next build",
"start": "next start", "start": "next start",
"analyze": "BUNDLE_ANALYZE=both yarn build", "analyze": "BUNDLE_ANALYZE=both yarn build",

View File

@@ -23,8 +23,8 @@
"@components/*": ["components/*"], "@components/*": ["components/*"],
"@commerce": ["framework/commerce"], "@commerce": ["framework/commerce"],
"@commerce/*": ["framework/commerce/*"], "@commerce/*": ["framework/commerce/*"],
"@framework": ["framework/local"], "@framework": ["framework/ordercloud"],
"@framework/*": ["framework/local/*"] "@framework/*": ["framework/ordercloud/*"]
} }
}, },
"include": ["next-env.d.ts", "**/*.d.ts", "**/*.ts", "**/*.tsx", "**/*.js"], "include": ["next-env.d.ts", "**/*.d.ts", "**/*.ts", "**/*.tsx", "**/*.js"],