Skip to content

Commit ae02e18

Browse files
committed
fix: remove unused locale handling from WithSidebar component
1 parent 48b3f00 commit ae02e18

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

apps/site/components/withSidebar.tsx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
'use client';
22

33
import Sidebar from '@node-core/ui-components/Containers/Sidebar';
4-
import { useLocale, useTranslations } from 'next-intl';
4+
import { useTranslations } from 'next-intl';
55
import { useRef } from 'react';
66

77
import Link from '#site/components/Link';
@@ -21,7 +21,6 @@ type WithSidebarProps = {
2121
const WithSidebar: FC<WithSidebarProps> = ({ navKeys, context, ...props }) => {
2222
const { getSideNavigation } = useSiteNavigation();
2323
const pathname = usePathname()!;
24-
const locale = useLocale();
2524
const t = useTranslations();
2625
const { push } = useRouter();
2726
const { frontmatter } = useClientContext();
@@ -45,7 +44,7 @@ const WithSidebar: FC<WithSidebarProps> = ({ navKeys, context, ...props }) => {
4544
<Sidebar
4645
ref={sidebarRef}
4746
groups={mappedSidebarItems}
48-
pathname={pathname.replace(`/${locale}`, '')}
47+
pathname={pathname}
4948
title={t('components.common.sidebar.title')}
5049
placeholder={frontmatter?.title}
5150
onSelect={push}

0 commit comments

Comments
 (0)