mirror of
https://github.com/trafficlunar/tomodachi-share.git
synced 2026-06-28 06:34:15 +00:00
feat: nprogress bar
This commit is contained in:
parent
53a23f35ef
commit
be6e622a5b
4 changed files with 53 additions and 3 deletions
|
|
@ -5,6 +5,7 @@ import { Lexend } from "next/font/google";
|
|||
import "./globals.css";
|
||||
import Header from "./components/header";
|
||||
import Footer from "./components/footer";
|
||||
import Providers from "./provider";
|
||||
|
||||
const lexend = Lexend({
|
||||
subsets: ["latin"],
|
||||
|
|
@ -25,9 +26,11 @@ export default function RootLayout({
|
|||
<body className={`${lexend.className} antialiased flex flex-col items-center min-h-screen`}>
|
||||
<Script defer src="https://analytics.trafficlunar.net/script.js" data-website-id="bc530384-9b7d-471a-b2e3-f9859da50c24" />
|
||||
|
||||
<Header />
|
||||
<div className="px-4 py-8 max-w-7xl w-full">{children}</div>
|
||||
<Footer />
|
||||
<Providers>
|
||||
<Header />
|
||||
<div className="px-4 py-8 max-w-7xl w-full">{children}</div>
|
||||
<Footer />
|
||||
</Providers>
|
||||
</body>
|
||||
</html>
|
||||
);
|
||||
|
|
|
|||
11
src/app/provider.tsx
Normal file
11
src/app/provider.tsx
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
"use client";
|
||||
|
||||
import { ProgressProvider } from "@bprogress/next/app";
|
||||
|
||||
export default function Providers({ children }: { children: React.ReactNode }) {
|
||||
return (
|
||||
<ProgressProvider height="4px" color="var(--color-amber-500)" options={{ showSpinner: false }} shallowRouting>
|
||||
{children}
|
||||
</ProgressProvider>
|
||||
);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue