Skip to content

Commit 205293c

Browse files
committed
fix(): Logo links to correct version
1 parent e8cfb1b commit 205293c

File tree

1 file changed

+3
-1
lines changed
  • docusaurus-theme/src/theme/DocSidebar

1 file changed

+3
-1
lines changed

docusaurus-theme/src/theme/DocSidebar/index.tsx

+3-1
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ import { translate } from '@docusaurus/Translate';
2929
import VersionSelector from '@theme/VersionSelector';
3030
import FrameworkSelector from '../FrameworkSelector';
3131
import { ChevronDown } from '@theme/icons';
32+
import { useActiveVersion } from '@theme/hooks/useDocs';
3233

3334
import styles from './styles.module.scss';
3435
import Backdrop from '@theme/Backdrop';
@@ -286,6 +287,7 @@ function DocSidebar({
286287
isHidden,
287288
...props
288289
}: Props): JSX.Element | null {
290+
const { path: homePath } = useActiveVersion();
289291
const showAnnouncementBar = useShowAnnouncementBar();
290292
const { hideableSidebar } = useThemeConfig();
291293
const { isClosed: isAnnouncementBarClosed } = useAnnouncementBar();
@@ -326,7 +328,7 @@ function DocSidebar({
326328
})}
327329
>
328330
<div className={clsx(styles.sidebarStart, 'doc-sidebar__start')}>
329-
<Link to={useBaseUrl('/')}>
331+
<Link to={useBaseUrl(homePath)}>
330332
<Logo tabIndex={-1} className={styles.sidebarLogo} />
331333
</Link>
332334
<VersionSelector />

0 commit comments

Comments
 (0)