@@ -7,7 +7,7 @@ import type { RichTranslationValues } from 'next-intl';
77import type { FC } from 'react' ;
88
99import Link from '#site/components/Link' ;
10- import { useDocumentTitle } from '#site/hooks' ;
10+ import { useClientContext } from '#site/hooks' ;
1111import { useSiteNavigation } from '#site/hooks/server' ;
1212import { useRouter } from '#site/navigation.mjs' ;
1313import type { NavigationKeys } from '#site/types' ;
@@ -24,7 +24,7 @@ const WithSidebar: FC<WithSidebarProps> = ({ navKeys, context, ...props }) => {
2424 const locale = useLocale ( ) ;
2525 const t = useTranslations ( ) ;
2626 const { push } = useRouter ( ) ;
27- const pageTitle = useDocumentTitle ( ) ;
27+ const { frontmatter } = useClientContext ( ) ;
2828 const sideNavigation = getSideNavigation ( navKeys , context ) ;
2929
3030 const mappedSidebarItems =
@@ -42,7 +42,7 @@ const WithSidebar: FC<WithSidebarProps> = ({ navKeys, context, ...props }) => {
4242 groups = { mappedSidebarItems }
4343 pathname = { pathname . replace ( `/${ locale } ` , '' ) }
4444 title = { t ( 'components.common.sidebar.title' ) }
45- placeholder = { pageTitle }
45+ placeholder = { frontmatter ?. title }
4646 onSelect = { push }
4747 as = { Link }
4848 { ...props }
0 commit comments