diff --git a/app/[locale]/[[...slug]]/category-page.tsx b/app/[locale]/[[...slug]]/category-page.tsx index 045aa315f..7cc1cfdc5 100644 --- a/app/[locale]/[[...slug]]/category-page.tsx +++ b/app/[locale]/[[...slug]]/category-page.tsx @@ -7,7 +7,6 @@ interface CategoryPageProps { // has access to state and effects just like Page components // in the `pages` directory. export default function ProductPage({data }: CategoryPageProps) { - console.log(data); return ( <>Category page diff --git a/app/[locale]/[[...slug]]/page.tsx b/app/[locale]/[[...slug]]/page.tsx index ad523a414..99f208150 100644 --- a/app/[locale]/[[...slug]]/page.tsx +++ b/app/[locale]/[[...slug]]/page.tsx @@ -14,8 +14,6 @@ export async function generateStaticParams() { next: { revalidate: 10 }, }) - // console.log(paths) - return paths.map((path: { slug: string, locale: string @@ -52,7 +50,7 @@ export default async function Page({ }) { const { slug, locale } = params; - const { query, queryParams, docType } = getQueryFromSlug(slug, locale) + const { query = '', queryParams, docType } = getQueryFromSlug(slug, locale) const pageData = await client.fetch(query, queryParams) diff --git a/app/[locale]/[[...slug]]/product-page.tsx b/app/[locale]/[[...slug]]/product-page.tsx index 8745d689d..1e1e69d71 100644 --- a/app/[locale]/[[...slug]]/product-page.tsx +++ b/app/[locale]/[[...slug]]/product-page.tsx @@ -1,4 +1,5 @@ import ProductView from "components/product/product-view"; +import { notFound } from "next/navigation"; interface ProductPageProps { data: object | any @@ -8,6 +9,10 @@ interface ProductPageProps { // has access to state and effects just like Page components // in the `pages` directory. export default function ProductPage({data }: ProductPageProps) { + if (!data) { + return notFound(); + } + const { product } = data; return ( diff --git a/app/[locale]/globals.css b/app/[locale]/globals.css index 71647370b..7a899dedd 100644 --- a/app/[locale]/globals.css +++ b/app/[locale]/globals.css @@ -39,6 +39,15 @@ body { } /* COMPONENTS */ +.glider { + scrollbar-width: none; + -ms-overflow-style: none; +} + +.glider::-webkit-scrollbar { + display: none; +} + .glider-dots { @apply flex !space-x-[2px] !mt-8; } diff --git a/app/[locale]/layout.tsx b/app/[locale]/layout.tsx index e0c00f19d..751c98bc8 100644 --- a/app/[locale]/layout.tsx +++ b/app/[locale]/layout.tsx @@ -57,7 +57,9 @@ export default async function LocaleLayout({children, params: {locale}}: LocaleL
-
{children}
+
+ {children} +