Added suspense and restructured layout AND pages

This commit is contained in:
Henrik Larsson
2023-08-09 14:19:27 +02:00
parent 5524d91da4
commit a16807c8d8
10 changed files with 30 additions and 149 deletions

View File

@@ -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 <DynamicContentManager content={page?.content} />;
return (
<>
<DynamicContentManager content={page?.content} />
<Suspense>
<Footer locale={params.locale} />
</Suspense>
</>
);
}