Skip to content

Commit

Permalink
Wrap root in suspense boundary
Browse files Browse the repository at this point in the history
  • Loading branch information
huypz committed Jan 26, 2024
1 parent fba418b commit 9bd2ad4
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/app/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import type { Metadata } from "next";
import "./globals.css";

import localFont from "next/font/local";
import { Suspense } from "react";

const font = localFont({ src: "../../fonts/NotoSansJP-Regular.woff2" });

Expand All @@ -16,8 +17,10 @@ export default function RootLayout({
children: React.ReactNode;
}) {
return (
<html lang="ja">
<body className={font.className}>{children}</body>
</html>
<Suspense>
<html lang="ja">
<body className={font.className}>{children}</body>
</html>
</Suspense>
);
}

0 comments on commit 9bd2ad4

Please sign in to comment.