File tree Expand file tree Collapse file tree 3 files changed +18
-1
lines changed Expand file tree Collapse file tree 3 files changed +18
-1
lines changed Original file line number Diff line number Diff line change 104
104
"nanoid" : " ^5.0.7" ,
105
105
"next" : " ^14.2.13" ,
106
106
"next-pwa" : " ^5.6.0" ,
107
+ "nextjs-toploader" : " ^3.6.15" ,
107
108
"numeral" : " ^2.0.6" ,
108
109
"openai" : " ^4.63.0" ,
109
110
"pino" : " ^9.4.0" ,
Original file line number Diff line number Diff line change 1
1
import { Analytics } from '@vercel/analytics/react' ;
2
2
import { PropsWithChildren } from 'react' ;
3
3
4
+ import NProgress from '@/components/NProgress' ;
4
5
import Layout from '@/layout' ;
5
6
6
7
import StyleRegistry from './StyleRegistry' ;
@@ -12,7 +13,10 @@ const RootLayout = ({ children }: PropsWithChildren) => {
12
13
< html lang = "cn" suppressHydrationWarning >
13
14
< body >
14
15
< StyleRegistry >
15
- < Layout > { children } </ Layout >
16
+ < Layout >
17
+ < NProgress />
18
+ { children }
19
+ </ Layout >
16
20
</ StyleRegistry >
17
21
< Analytics />
18
22
</ body >
Original file line number Diff line number Diff line change
1
+ 'use client' ;
2
+
3
+ import { useTheme } from 'antd-style' ;
4
+ import NextTopLoader from 'nextjs-toploader' ;
5
+ import { memo } from 'react' ;
6
+
7
+ const NProgress = memo ( ( ) => {
8
+ const theme = useTheme ( ) ;
9
+ return < NextTopLoader color = { theme . colorText } height = { 2 } shadow = { false } showSpinner = { false } /> ;
10
+ } ) ;
11
+
12
+ export default NProgress ;
You can’t perform that action at this time.
0 commit comments