From a16807c8d81e316ef271dcd55689ad2dc1b05403 Mon Sep 17 00:00:00 2001 From: Henrik Larsson Date: Wed, 9 Aug 2023 14:19:27 +0200 Subject: [PATCH] Added suspense and restructured layout AND pages --- app/[locale]/[...slug]/page.tsx | 10 ++- app/[locale]/category/[slug]/page.tsx | 5 ++ app/[locale]/layout.tsx | 9 +-- app/[locale]/page.tsx | 5 ++ app/[locale]/product/[slug]/page.tsx | 7 +- app/api/cart/route.ts | 75 ------------------ app/api/og/Inter-Bold.ttf | Bin 316100 -> 0 bytes app/api/og/Inter-Regular.ttf | Bin 309828 -> 0 bytes app/api/og/route.tsx | 67 ---------------- .../dynamic-content-manager.tsx | 1 + 10 files changed, 30 insertions(+), 149 deletions(-) delete mode 100644 app/api/cart/route.ts delete mode 100644 app/api/og/Inter-Bold.ttf delete mode 100644 app/api/og/Inter-Regular.ttf delete mode 100644 app/api/og/route.tsx diff --git a/app/[locale]/[...slug]/page.tsx b/app/[locale]/[...slug]/page.tsx index 6a621b175..2129b7a10 100644 --- a/app/[locale]/[...slug]/page.tsx +++ b/app/[locale]/[...slug]/page.tsx @@ -3,6 +3,7 @@ import { pageQuery } from 'lib/sanity/queries'; import { clientFetch } from 'lib/sanity/sanity.client'; import type { Metadata } from 'next'; import { notFound } from 'next/navigation'; +import { Suspense } from 'react'; export const runtime = 'edge'; @@ -73,5 +74,12 @@ export default async function Page({ params }: PageParams) { if (!page) return notFound(); - return ; + return ( + <> + + +