File tree Expand file tree Collapse file tree 1 file changed +8
-7
lines changed
Expand file tree Collapse file tree 1 file changed +8
-7
lines changed Original file line number Diff line number Diff line change @@ -433,19 +433,20 @@ export default function Header(props: HeaderProps) {
433433
434434const HeaderBanner = ( props : HeaderProps ) => {
435435 const { t } = useI18next ( ) ;
436- const { namespace } = props ;
436+ const { namespace, name } = props ;
437437 const isAutoTranslation = useIsAutoTranslation ( namespace ) ;
438- const trailPath = props . name === "_index" ? "" : props . name ;
439438 const urlAutoTranslation =
440- namespace === TOCNamespace . TidbCloudReleases && props . name === "_index"
441- ? `/releases/tidb-cloud/`
439+ namespace === TOCNamespace . TidbCloudReleases
440+ ? ! name
441+ ? `/releases/tidb-cloud/`
442+ : `/tidbcloud/${ name } `
442443 : namespace === TOCNamespace . AI
443- ? `/ai/${ trailPath } `
444+ ? `/ai/${ name } `
444445 : namespace === TOCNamespace . TiDBCloud
445- ? `/tidbcloud/${ trailPath } `
446+ ? `/tidbcloud/${ name } `
446447 : `/${ props . pathConfig ?. repo } /${
447448 props . pathConfig ?. version || "stable"
448- } /${ trailPath } `;
449+ } /${ name } `;
449450
450451 let archivedTargetUrl = "" ;
451452 if ( props . name && props . pathConfig ) {
You can’t perform that action at this time.
0 commit comments