Skip to content

Commit

Permalink
Fix: Suspense error
Browse files Browse the repository at this point in the history
  • Loading branch information
Hayao0819 committed Feb 23, 2024
1 parent 5822608 commit 364dde8
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/app/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import "@/style/global.css";
import "@/style/prism.css";

import { Metadata as NextMetadata } from "next";
import React, { ReactNode } from "react";
import React, { ReactNode, Suspense } from "react";

import GoogleAnalytics from "@/components/elements/GoogleAnalytics";
import { genMetaData } from "@/lib/meta";
Expand All @@ -13,7 +13,9 @@ export default function RootLayout({ children }: { children: ReactNode }) {
return (
<html className="overflow-x-scroll md:overflow-x-auto" lang="ja">
<head>
<GoogleAnalytics />
<Suspense>
<GoogleAnalytics />
</Suspense>
</head>
<body className="overflow-x-hidden overscroll-y-none">{children}</body>
</html>
Expand Down

0 comments on commit 364dde8

Please sign in to comment.