File tree Expand file tree Collapse file tree 2 files changed +14
-19
lines changed
crd-seed/component/NoMatch Expand file tree Collapse file tree 2 files changed +14
-19
lines changed Original file line number Diff line number Diff line change 1- import { hydrate , render } from 'react-dom'
1+ import { hydrate } from 'react-dom'
22import { renderToString } from 'react-dom/server' ;
33// import { hydrateRoot } from 'react-dom/client'
44import '@babel/polyfill'
@@ -7,8 +7,8 @@ import RouterRoot from './Router'
77
88if ( ifDev ) {
99 // dev render
10- // document.getElementById('root').innerHTML = renderToString(<RouterRoot />)
11- render (
10+ document . getElementById ( 'root' ) . innerHTML = renderToString ( < RouterRoot /> )
11+ hydrate (
1212 < RouterRoot /> ,
1313 document . getElementById ( 'root' ) ,
1414 )
Original file line number Diff line number Diff line change 1- import { Outlet } from 'react-router-dom'
21import styles from './index.less'
32
43const NoMatch = ( ) => {
5- console . log ( 'test 404' )
64 // eslint-disable-next-line no-undef
75 const { user, repo } = DOCSCONFIG || { }
86 return (
9- < >
10- < table className = { styles . noMatch } >
11- < tbody >
12- < tr >
13- < td >
14- < h1 > 404</ h1 >
15- < div > 你似乎来到了没有知识存在的荒原...</ div >
16- < section > 在 github 访问< a href = { `https://github.com/${ user } /${ repo } ` } > 该项目</ a > </ section >
17- </ td >
18- </ tr >
19- </ tbody >
20- </ table >
21- < Outlet />
22- </ >
7+ < table className = { styles . noMatch } >
8+ < tbody >
9+ < tr >
10+ < td >
11+ < h1 > 404</ h1 >
12+ < div > 你似乎来到了没有知识存在的荒原...</ div >
13+ < section > 在 github 访问< a href = { `https://github.com/${ user } /${ repo } ` } > 该项目</ a > </ section >
14+ </ td >
15+ </ tr >
16+ </ tbody >
17+ </ table >
2318 )
2419}
2520
You can’t perform that action at this time.
0 commit comments