diff --git a/src/app/layout.tsx b/src/app/layout.tsx index 7a7aa7d9..a91a645b 100644 --- a/src/app/layout.tsx +++ b/src/app/layout.tsx @@ -1,6 +1,7 @@ import "@/src/app/_components/layouts/global.css" import { clsx } from "clsx" import { Metadata, Viewport } from "next" +import { Suspense } from "react" import { BlitzProvider } from "../blitz-client" import { defaultMetadata } from "./_components/layouts/defaultMetadata" import { fontClasses } from "./_components/layouts/fonts" @@ -16,7 +17,9 @@ export default async function RootLayout({ children }: { children: React.ReactNo -
{children}
+ +
{children}
+
diff --git a/src/pages/_app.tsx b/src/pages/_app.tsx index 6815eb39..d4e6728f 100644 --- a/src/pages/_app.tsx +++ b/src/pages/_app.tsx @@ -4,7 +4,7 @@ import "@/src/app/_components/layouts/global.css" import { withBlitz } from "@/src/blitz-client" import { init } from "@socialgouv/matomo-next" import { AuthenticationError, AuthorizationError } from "blitz" -import { useEffect, useRef } from "react" +import { Suspense, useEffect, useRef } from "react" import { fontRedHatText } from "../app/_components/layouts/fonts" const MATOMO_URL = process.env.NEXT_PUBLIC_MATOMO_URL @@ -51,7 +51,7 @@ function MyApp({ Component, pageProps }: AppProps) { } `} - {getLayout()} + {getLayout()} ) diff --git a/tests/blitz/utils.tsx b/tests/blitz/utils.tsx index 3ee4bf35..feb98805 100644 --- a/tests/blitz/utils.tsx +++ b/tests/blitz/utils.tsx @@ -4,6 +4,7 @@ import { render as defaultRender } from "@testing-library/react" import { renderHook as defaultRenderHook } from "@testing-library/react-hooks" import { MemoryRouterProvider } from "next-router-mock/dist/MemoryRouterProvider" import { NextRouter } from "next/router" +import { Suspense } from "react" import { vi } from "vitest" export * from "@testing-library/react" @@ -40,7 +41,7 @@ export function render( - {children} + {children} @@ -69,7 +70,7 @@ export function renderHook( wrapper = ({ children }: { children: React.ReactNode }) => ( - {children} + {children} )