File tree Expand file tree Collapse file tree 2 files changed +11
-9
lines changed
Expand file tree Collapse file tree 2 files changed +11
-9
lines changed Original file line number Diff line number Diff line change 11import type { Metadata } from 'next' ;
22import { ThemeProvider } from 'next-themes' ;
3- import { PropsWithChildren } from 'react' ;
3+ import { PropsWithChildren , Suspense } from 'react' ;
44
55import Footer from '~/components/Footer' ;
66import Header from '~/components/Header' ;
@@ -42,13 +42,15 @@ export default function RootLayout({ children }: PropsWithChildren) {
4242 < html lang = "en" suppressHydrationWarning >
4343 < body className = "relative min-h-dvh antialiased font-sans text-primary bg-background" >
4444 < ThemeProvider attribute = "data-theme" >
45- < SearchProvider >
46- < Header />
47- < div className = "min-h-[calc(100dvh-58px)] grid grid-rows-[1fr_min-content]" >
48- { children }
49- < Footer />
50- </ div >
51- </ SearchProvider >
45+ < Suspense >
46+ < SearchProvider >
47+ < Header />
48+ < div className = "min-h-[calc(100dvh-58px)] grid grid-rows-[1fr_min-content]" >
49+ { children }
50+ < Footer />
51+ </ div >
52+ </ SearchProvider >
53+ </ Suspense >
5254 </ ThemeProvider >
5355 </ body >
5456 </ html >
Original file line number Diff line number Diff line change 88 "scripts" : {
99 "dev" : " next dev" ,
1010 "build" : " next build" ,
11- "start" : " next start " ,
11+ "start" : " npx serve out " ,
1212 "lint" : " eslint" ,
1313 "data:fetch" : " node ./scripts/fetch-data.mjs"
1414 },
You can’t perform that action at this time.
0 commit comments