💄 Loading progress bar

This commit is contained in:
LittleSheep 2025-01-04 18:44:15 +08:00
parent 423b3dac05
commit af2e87dd84
3 changed files with 8 additions and 0 deletions

BIN
bun.lockb

Binary file not shown.

View File

@ -24,6 +24,7 @@
"axios-case-converter": "^1.1.1", "axios-case-converter": "^1.1.1",
"cookies-next": "^5.0.2", "cookies-next": "^5.0.2",
"next": "15.1.3", "next": "15.1.3",
"next-nprogress-bar": "^2.4.3",
"react": "^19.0.0", "react": "^19.0.0",
"react-dom": "^19.0.0", "react-dom": "^19.0.0",
"react-hook-form": "^7.54.2", "react-hook-form": "^7.54.2",

View File

@ -3,6 +3,7 @@ import type { AppProps } from 'next/app'
import { Box, createTheme, CssBaseline, ThemeProvider } from '@mui/material' import { Box, createTheme, CssBaseline, ThemeProvider } from '@mui/material'
import { Roboto } from 'next/font/google' import { Roboto } from 'next/font/google'
import { CapAppBar } from '@/components/CapAppBar' import { CapAppBar } from '@/components/CapAppBar'
import { PagesProgressBar as ProgressBar } from 'next-nprogress-bar'
import { useUserStore } from '@/services/user' import { useUserStore } from '@/services/user'
import { useEffect } from 'react' import { useEffect } from 'react'
import Head from 'next/head' import Head from 'next/head'
@ -57,6 +58,12 @@ export default function App({ Component, pageProps }: AppProps) {
<ThemeProvider theme={siteTheme}> <ThemeProvider theme={siteTheme}>
<CssBaseline /> <CssBaseline />
<ProgressBar
height="4px"
color={siteTheme.palette.primary.main}
options={{ showSpinner: false }}
shallowRouting
/>
<CapAppBar /> <CapAppBar />
<Box sx={{ minHeight: 'calc(100vh - 64px)' }}> <Box sx={{ minHeight: 'calc(100vh - 64px)' }}>