feat: loading on page change

This commit is contained in:
Julien Froidefond
2025-02-15 11:37:54 +01:00
parent c049341fcd
commit eb542feaef
5 changed files with 171 additions and 38 deletions

View File

@@ -2,6 +2,8 @@ import type { Metadata } from "next";
import { Inter } from "next/font/google";
import "@/styles/globals.css";
import { cn } from "@/lib/utils";
import ClientLayout from "@/components/layout/ClientLayout";
import { NetworkProgressProvider } from "@/components/ui/network-progress";
const inter = Inter({ subsets: ["latin"] });
@@ -53,9 +55,6 @@ export const metadata: Metadata = {
},
};
// Composant client séparé pour le layout
import ClientLayout from "@/components/layout/ClientLayout";
export default function RootLayout({ children }: { children: React.ReactNode }) {
return (
<html lang="fr" suppressHydrationWarning>
@@ -115,7 +114,9 @@ export default function RootLayout({ children }: { children: React.ReactNode })
/>
</head>
<body className={cn("min-h-screen bg-background font-sans antialiased", inter.className)}>
<ClientLayout>{children}</ClientLayout>
<NetworkProgressProvider>
<ClientLayout>{children}</ClientLayout>
</NetworkProgressProvider>
</body>
</html>
);