diff --git a/app/[locale]/[[...slug]]/page.tsx b/app/[locale]/[...slug]/page.tsx similarity index 100% rename from app/[locale]/[[...slug]]/page.tsx rename to app/[locale]/[...slug]/page.tsx diff --git a/app/[locale]/[[...slug]]/pages/category-page.tsx b/app/[locale]/[...slug]/pages/category-page.tsx similarity index 100% rename from app/[locale]/[[...slug]]/pages/category-page.tsx rename to app/[locale]/[...slug]/pages/category-page.tsx diff --git a/app/[locale]/[[...slug]]/pages/home-page.tsx b/app/[locale]/[...slug]/pages/home-page.tsx similarity index 100% rename from app/[locale]/[[...slug]]/pages/home-page.tsx rename to app/[locale]/[...slug]/pages/home-page.tsx diff --git a/app/[locale]/[[...slug]]/pages/product-page.tsx b/app/[locale]/[...slug]/pages/product-page.tsx similarity index 100% rename from app/[locale]/[[...slug]]/pages/product-page.tsx rename to app/[locale]/[...slug]/pages/product-page.tsx diff --git a/app/[locale]/[[...slug]]/pages/single-page.tsx b/app/[locale]/[...slug]/pages/single-page.tsx similarity index 100% rename from app/[locale]/[[...slug]]/pages/single-page.tsx rename to app/[locale]/[...slug]/pages/single-page.tsx diff --git a/app/[locale]/...page.tsx b/app/[locale]/page.tsx similarity index 100% rename from app/[locale]/...page.tsx rename to app/[locale]/page.tsx diff --git a/helpers/get-query-from-slug.ts b/helpers/get-query-from-slug.ts index 2979b0101..83657ca3f 100644 --- a/helpers/get-query-from-slug.ts +++ b/helpers/get-query-from-slug.ts @@ -1,6 +1,5 @@ import { categoryQuery, - homePageQuery, pageQuery, productQuery } from '@/lib/sanity/queries'; @@ -8,22 +7,11 @@ import { groq } from 'next-sanity'; const getQueryFromSlug = (slugArray: string[], locale: string) => { const docQuery: { [index: string]: string } = { - 'home': groq`${homePageQuery}`, 'product': groq`${productQuery}`, 'category': groq`${categoryQuery}`, 'page': groq`${pageQuery}`, } - if (!slugArray) { - return { - docType: "home", - queryParams: { - locale: locale - }, - query: docQuery.home, - } - } - let docType = '' const [slugStart] = slugArray