File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed
Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -435,16 +435,17 @@ const HeaderBanner = (props: HeaderProps) => {
435435 const { t } = useI18next ( ) ;
436436 const { namespace } = props ;
437437 const isAutoTranslation = useIsAutoTranslation ( namespace ) ;
438+ const trailPath = props . name === "_index" ? "" : props . name ;
438439 const urlAutoTranslation =
439440 namespace === TOCNamespace . TidbCloudReleases && props . name === "_index"
440441 ? `/releases/tidb-cloud/`
441442 : namespace === TOCNamespace . AI
442- ? `/ai/${ props . name === "_index" ? "" : props . name } `
443+ ? `/ai/${ trailPath } `
443444 : namespace === TOCNamespace . TiDBCloud
444- ? `/tidbcloud/${ props . name === "_index" ? "" : props . name } `
445- : `/${ props . pathConfig ?. repo } /${ props . pathConfig ?. version || "stable" } / ${
446- props . name === "_index" ? "" : props . name
447- } `;
445+ ? `/tidbcloud/${ trailPath } `
446+ : `/${ props . pathConfig ?. repo } /${
447+ props . pathConfig ?. version || "stable"
448+ } / ${ trailPath } `;
448449
449450 let archivedTargetUrl = "" ;
450451 if ( props . name && props . pathConfig ) {
You can’t perform that action at this time.
0 commit comments