From 1ca052cc0bd1e0244142c0bf2a5810d64a67042f Mon Sep 17 00:00:00 2001 From: Henrik Larsson Date: Sun, 13 Aug 2023 14:40:44 +0200 Subject: [PATCH] Tried some updates --- app/[locale]/[...slug]/page.tsx | 2 -- app/[locale]/[...slug]/pages/home-page.tsx | 23 ---------------------- 2 files changed, 25 deletions(-) delete mode 100644 app/[locale]/[...slug]/pages/home-page.tsx diff --git a/app/[locale]/[...slug]/page.tsx b/app/[locale]/[...slug]/page.tsx index e90545d31..980ff4274 100644 --- a/app/[locale]/[...slug]/page.tsx +++ b/app/[locale]/[...slug]/page.tsx @@ -3,7 +3,6 @@ import { clientFetch } from 'lib/sanity/sanity.client'; import type { Metadata } from 'next'; import { notFound } from 'next/navigation'; import CategoryPage from './pages/category-page'; -import HomePage from './pages/home-page'; import ProductPage from './pages/product-page'; import SinglePage from './pages/single-page'; @@ -49,7 +48,6 @@ export default async function Page({ params }: PageParams) { return ( <> - {docType === 'home' && } {docType === 'page' && } {docType === 'product' && } {docType === 'category' && } diff --git a/app/[locale]/[...slug]/pages/home-page.tsx b/app/[locale]/[...slug]/pages/home-page.tsx deleted file mode 100644 index 4fb8b4398..000000000 --- a/app/[locale]/[...slug]/pages/home-page.tsx +++ /dev/null @@ -1,23 +0,0 @@ -import DynamicContentManager from '@/components/layout/dynamic-content-manager/dynamic-content-manager'; -import { clientFetch } from '@/lib/sanity/sanity.client'; -import { notFound } from 'next/navigation'; - -interface HomePageParams { - query: string; - queryParams: { - slug: string; - locale: string; - }; -} - -export default async function HomePage({ query = '', queryParams }: HomePageParams) { - const homePage = await clientFetch(query, queryParams); - - if (!homePage) return notFound(); - - return ( -
- ; -
- ); -}