File tree 2 files changed +4
-4
lines changed
2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -9,7 +9,7 @@ const Footer = () => {
9
9
< tr >
10
10
< td >
11
11
< h1 > 404</ h1 >
12
- < div > 杯具啊!页面不存在 </ div >
12
+ < div > 你似乎来到了没有知识存在的荒原... </ div >
13
13
< section > 在 github 访问< a href = { `https://github.com/${ user } /${ repo } ` } > 该项目</ a > </ section >
14
14
</ td >
15
15
</ tr >
Original file line number Diff line number Diff line change @@ -43,11 +43,12 @@ function BasicLayout({
43
43
useEffect ( ( ) => {
44
44
const { pathname } = location
45
45
let newPathName = pathname
46
+ // fix https://github.com/MuYunyun/create-react-doc/issues/195
46
47
if ( newPathName . endsWith ( '/' ) ) {
47
- newPathName . slice ( 0 , newPathName . length - 1 )
48
+ newPathName = newPathName . slice ( 0 , newPathName . length - 1 )
48
49
}
49
50
if ( newPathName . startsWith ( `/${ repo } ` ) ) {
50
- newPathName . slice ( `/${ repo } ` . length , newPathName . length )
51
+ newPathName = newPathName . slice ( `/${ repo } ` . length , newPathName . length )
51
52
}
52
53
setSelectedKey ( newPathName )
53
54
} , location )
@@ -101,7 +102,6 @@ function BasicLayout({
101
102
}
102
103
const renderMenu = ( menus ) => {
103
104
if ( menus . length < 1 ) return null
104
- console . log ( 'selectedKey' , selectedKey )
105
105
return (
106
106
< Affix
107
107
offsetTop = { 0 }
You can’t perform that action at this time.
0 commit comments