Skip to content

Commit

Permalink
added router loader
Browse files Browse the repository at this point in the history
  • Loading branch information
velascoandres committed May 7, 2024
1 parent cb2631a commit ceaa222
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 0 deletions.
Binary file modified bun.lockb
Binary file not shown.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
"lucide-react": "^0.334.0",
"next": "^14.0.4",
"next-auth": "^4.24.5",
"next-nprogress-bar": "^2.3.11",
"next-themes": "^0.2.1",
"postgres": "^3.4.3",
"react": "18.2.0",
Expand Down
14 changes: 14 additions & 0 deletions src/app/_shared/components/navigation/navigation-progress.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
'use client'

import React from 'react'
import { AppProgressBar as NProgressBar } from 'next-nprogress-bar'

export const NavigationProgress = () => {
return (
<NProgressBar
color="#63e"
options={{ showSpinner: false }}
shallowRouting
/>
)
}
2 changes: 2 additions & 0 deletions src/app/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { TRPCReactProvider } from '@/trpc/react'

import { AuthProvider } from './_auth/components/auth-provider'
import { ModalContainer } from './_shared/components/modal/modal-container'
import { NavigationProgress } from './_shared/components/navigation/navigation-progress'
import { ThemeProvider } from './_shared/components/theme/theme-provider'
import { Toaster } from './_shared/components/ui/toaster'

Expand Down Expand Up @@ -42,6 +43,7 @@ export default function RootLayout({
return (
<html lang="en" suppressHydrationWarning>
<body className={`font-sans ${dm_sans.variable}`}>
<NavigationProgress />
<AuthProvider>
<ThemeProvider
attribute="class"
Expand Down

0 comments on commit ceaa222

Please sign in to comment.