Skip to content

Commit 61c08ac

Browse files
committed
perf: header
1 parent b231346 commit 61c08ac

File tree

2 files changed

+1
-24
lines changed

2 files changed

+1
-24
lines changed

src/components/layout/Header.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ const Header = ({ hiddenAd, showAd }: Props) => {
104104
{t('header.periodical')}
105105
</HeaderBtn>
106106
</li>
107-
<li className={liClassName('/report/tiobe')}>
107+
<li className={liClassName('/report')}>
108108
<RankButton t={t} />
109109
</li>
110110
<li className={liClassName('/article')}>

src/pages/_app.tsx

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -27,29 +27,6 @@ function MyApp({ Component, pageProps }: AppProps) {
2727
// 需要单页面展示的路由
2828
const singlePage: string[] = ['/404', '/500'];
2929

30-
// 页面跳转时的加载进度条
31-
useEffect(() => {
32-
// 不显示右上角的加载转圈图标
33-
NProgress.configure({ showSpinner: false });
34-
const handleStart = () => {
35-
NProgress.start();
36-
};
37-
38-
const handleStop = () => {
39-
NProgress.done();
40-
};
41-
42-
router.events.on('routeChangeStart', handleStart);
43-
router.events.on('routeChangeComplete', handleStop);
44-
router.events.on('routeChangeError', handleStop);
45-
46-
return () => {
47-
router.events.off('routeChangeStart', handleStart);
48-
router.events.off('routeChangeComplete', handleStop);
49-
router.events.off('routeChangeError', handleStop);
50-
};
51-
}, [router]);
52-
5330
return (
5431
<div id='root'>
5532
<Script id='baidu-analytics'>

0 commit comments

Comments
 (0)