mirror of
https://github.com/jakejarvis/jarv.is.git
synced 2025-10-30 03:36:03 -04:00
Add @bprogress/next dependency and update layout to use Providers component
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import { env } from "@/lib/env";
|
||||
import { JsonLd } from "react-schemaorg";
|
||||
import { ThemeProvider } from "@/components/theme/theme-context";
|
||||
import Providers from "@/components/providers";
|
||||
import { ThemeScript } from "@/components/theme/theme-script";
|
||||
import Header from "@/components/layout/header";
|
||||
import Footer from "@/components/layout/footer";
|
||||
@@ -64,8 +64,8 @@ const RootLayout = ({ children }: Readonly<{ children: React.ReactNode }>) => {
|
||||
</head>
|
||||
|
||||
<body className="bg-background text-foreground font-sans antialiased">
|
||||
<ThemeProvider>
|
||||
<div className="mx-auto w-full max-w-4xl px-5">
|
||||
<Providers>
|
||||
<div className="mx-auto w-full max-w-4xl px-5 py-1">
|
||||
<Header className="mt-4 mb-6 w-full" />
|
||||
|
||||
<main>{children}</main>
|
||||
@@ -74,9 +74,8 @@ const RootLayout = ({ children }: Readonly<{ children: React.ReactNode }>) => {
|
||||
</div>
|
||||
|
||||
<Toaster position="bottom-center" hotkey={[]} />
|
||||
</ThemeProvider>
|
||||
|
||||
<Analytics />
|
||||
<Analytics />
|
||||
</Providers>
|
||||
</body>
|
||||
</html>
|
||||
);
|
||||
|
||||
21
components/providers.tsx
Normal file
21
components/providers.tsx
Normal file
@@ -0,0 +1,21 @@
|
||||
"use client";
|
||||
|
||||
import { ThemeProvider } from "@/components/theme/theme-context";
|
||||
import { ProgressProvider } from "@bprogress/next/app";
|
||||
|
||||
const Providers = ({ children }: { children: React.ReactNode }) => {
|
||||
return (
|
||||
<ThemeProvider>
|
||||
<ProgressProvider
|
||||
height="calc(var(--spacing) * 1)"
|
||||
color="var(--primary)"
|
||||
options={{ showSpinner: false }}
|
||||
shallowRouting
|
||||
>
|
||||
{children}
|
||||
</ProgressProvider>
|
||||
</ThemeProvider>
|
||||
);
|
||||
};
|
||||
|
||||
export default Providers;
|
||||
@@ -20,6 +20,7 @@
|
||||
"prepare": "test -d node_modules/husky && husky || echo \"skipping husky\""
|
||||
},
|
||||
"dependencies": {
|
||||
"@bprogress/next": "^3.2.12",
|
||||
"@date-fns/tz": "^1.4.1",
|
||||
"@date-fns/utc": "^2.1.1",
|
||||
"@mdx-js/loader": "^3.1.1",
|
||||
|
||||
35
pnpm-lock.yaml
generated
35
pnpm-lock.yaml
generated
@@ -8,6 +8,9 @@ importers:
|
||||
|
||||
.:
|
||||
dependencies:
|
||||
'@bprogress/next':
|
||||
specifier: ^3.2.12
|
||||
version: 3.2.12(next@15.5.1-canary.23(@babel/core@7.28.3)(babel-plugin-react-compiler@19.1.0-rc.3)(react-dom@19.1.1(react@19.1.1))(react@19.1.1))(react-dom@19.1.1(react@19.1.1))(react@19.1.1)
|
||||
'@date-fns/tz':
|
||||
specifier: ^1.4.1
|
||||
version: 1.4.1
|
||||
@@ -461,6 +464,22 @@ packages:
|
||||
'@better-fetch/fetch@1.1.18':
|
||||
resolution: {integrity: sha512-rEFOE1MYIsBmoMJtQbl32PGHHXuG2hDxvEd7rUHE0vCBoFQVSDqaVs9hkZEtHCxRoY+CljXKFCOuJ8uxqw1LcA==}
|
||||
|
||||
'@bprogress/core@1.3.4':
|
||||
resolution: {integrity: sha512-q/AqpurI/1uJzOrQROuZWixn/+ARekh+uvJGwLCP6HQ/EqAX4SkvNf618tSBxL4NysC0MwqAppb/mRw6Tzi61w==}
|
||||
|
||||
'@bprogress/next@3.2.12':
|
||||
resolution: {integrity: sha512-/ZvNwbAd0ty9QiQwCfT2AfwWVdAaEyCPx5RUz3CfiiJS/OLBohhDz/IC/srhwK9GnXeXavvtiUrpKzN5GJDwlw==}
|
||||
peerDependencies:
|
||||
next: '>=13.0.0'
|
||||
react: '>=18.0.0'
|
||||
react-dom: '>=18.0.0'
|
||||
|
||||
'@bprogress/react@1.2.7':
|
||||
resolution: {integrity: sha512-MqJfHW+R5CQeWqyqrLxUjdBRHk24Xl63OkBLo5DMWqUqocUikRTfCIc/jtQQbPk7BRfdr5OP3Lx7YlfQ9QOZMQ==}
|
||||
peerDependencies:
|
||||
react: '>=18.0.0'
|
||||
react-dom: '>=18.0.0'
|
||||
|
||||
'@date-fns/tz@1.4.1':
|
||||
resolution: {integrity: sha512-P5LUNhtbj6YfI3iJjw5EL9eUAG6OitD0W3fWQcpQjDRc/QIsL0tRNuO1PcDvPccWL1fSTXXdE1ds+l95DV/OFA==}
|
||||
|
||||
@@ -5219,6 +5238,22 @@ snapshots:
|
||||
|
||||
'@better-fetch/fetch@1.1.18': {}
|
||||
|
||||
'@bprogress/core@1.3.4': {}
|
||||
|
||||
'@bprogress/next@3.2.12(next@15.5.1-canary.23(@babel/core@7.28.3)(babel-plugin-react-compiler@19.1.0-rc.3)(react-dom@19.1.1(react@19.1.1))(react@19.1.1))(react-dom@19.1.1(react@19.1.1))(react@19.1.1)':
|
||||
dependencies:
|
||||
'@bprogress/core': 1.3.4
|
||||
'@bprogress/react': 1.2.7(react-dom@19.1.1(react@19.1.1))(react@19.1.1)
|
||||
next: 15.5.1-canary.23(@babel/core@7.28.3)(babel-plugin-react-compiler@19.1.0-rc.3)(react-dom@19.1.1(react@19.1.1))(react@19.1.1)
|
||||
react: 19.1.1
|
||||
react-dom: 19.1.1(react@19.1.1)
|
||||
|
||||
'@bprogress/react@1.2.7(react-dom@19.1.1(react@19.1.1))(react@19.1.1)':
|
||||
dependencies:
|
||||
'@bprogress/core': 1.3.4
|
||||
react: 19.1.1
|
||||
react-dom: 19.1.1(react@19.1.1)
|
||||
|
||||
'@date-fns/tz@1.4.1': {}
|
||||
|
||||
'@date-fns/utc@2.1.1': {}
|
||||
|
||||
Reference in New Issue
Block a user