Updated TypeScript to resolve async RSC error

This commit is contained in:
Henrik Larsson
2023-08-09 14:40:45 +02:00
parent 336ae78a4b
commit a34b4b628c
5 changed files with 4 additions and 26 deletions

View File

@@ -1,10 +1,8 @@
import Footer from '@/components/layout/footer/footer';
import DynamicContentManager from 'components/layout/dynamic-content-manager';
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';
@@ -75,12 +73,5 @@ export default async function Page({ params }: PageParams) {
if (!page) return notFound();
return (
<>
<DynamicContentManager content={page?.content} />
<Suspense>
<Footer locale={params.locale} />
</Suspense>
</>
);
return <DynamicContentManager content={page?.content} />;
}