File tree Expand file tree Collapse file tree 3 files changed +7
-7
lines changed Expand file tree Collapse file tree 3 files changed +7
-7
lines changed Original file line number Diff line number Diff line change 1- import { hydrateRoot } from 'react-dom/client'
21import { renderToString } from 'react-dom/server' ;
2+ import { hydrateRoot } from 'react-dom/client'
33import '@babel/polyfill'
44import { ifDev , ifPrerender } from 'crd-client-utils'
55import RouterRoot from './Router'
@@ -20,4 +20,4 @@ if (ifDev) {
2020 document . getElementById ( 'root' ) ,
2121 < RouterRoot /> ,
2222 )
23- }
23+ }
Original file line number Diff line number Diff line change 11import { Link , useRouteMatch } from 'react-router-dom'
22import { ifProd } from 'crd-client-utils'
3+ import { ifAddPrefix } from '../../utils'
34import styles from './index.less'
45
56/**
67 * name: the name of tag category.
78 */
89const Tags = ( ) => {
910 const { user, repo } = DOCSCONFIG || { }
10- const routeMatch = useRouteMatch ( '/tags/:name' ) || { }
11+ const path = ifAddPrefix ? `/${ repo } /tags/:name` : '/tags/:name'
12+ const routeMatch = useRouteMatch ( path ) || { }
1113 const { name } = routeMatch . params || { }
1214
1315 return (
Original file line number Diff line number Diff line change @@ -14,10 +14,8 @@ export default function (props) {
1414 // support for custom theme.
1515 const CustomTheme = require ( '__project_theme__' ) . default
1616
17+ // use custom theme here.
1718 return (
18- < React . StrictMode >
19- { /* use custom theme here. */ }
20- < CustomTheme { ...props } />
21- </ React . StrictMode >
19+ < CustomTheme { ...props } />
2220 )
2321}
You can’t perform that action at this time.
0 commit comments