diff --git a/apps/web/src/components/global/navbar/NavI18nDropdown.tsx b/apps/web/src/components/global/navbar/NavI18nDropdown.tsx index c0002dd8f..9f1597073 100644 --- a/apps/web/src/components/global/navbar/NavI18nDropdown.tsx +++ b/apps/web/src/components/global/navbar/NavI18nDropdown.tsx @@ -1,10 +1,11 @@ import { RiTranslate2 } from 'react-icons/ri'; +import url from 'url'; import { useIntl } from '~/components/intl'; import DropdownMenu from '~/components/ui/DropdownMenu'; import i18nLabelOptions from '~/i18n/i18nLabelOptions'; -import { useI18nPathname } from '~/next-i18nostic/src'; +import { i18nHref, useI18nPathname } from '~/next-i18nostic/src'; type Props = Readonly<{ showSelected?: boolean; @@ -45,10 +46,15 @@ export default function NavI18nDropdown({ size, showSelected }: Props) { {i18nLabelOptions.map(({ label, locale: localeItem }) => ( ))} diff --git a/apps/web/src/components/global/sidebar/SidebarI18nSubMenu.tsx b/apps/web/src/components/global/sidebar/SidebarI18nSubMenu.tsx index c18fa91e7..b13a3752c 100644 --- a/apps/web/src/components/global/sidebar/SidebarI18nSubMenu.tsx +++ b/apps/web/src/components/global/sidebar/SidebarI18nSubMenu.tsx @@ -1,10 +1,11 @@ import { RiTranslate2 } from 'react-icons/ri'; +import url from 'url'; import { useIntl } from '~/components/intl'; import DropdownMenu from '~/components/ui/DropdownMenu'; import i18nLabelOptions from '~/i18n/i18nLabelOptions'; -import { useI18nPathname } from '~/next-i18nostic/src'; +import { i18nHref, useI18nPathname } from '~/next-i18nostic/src'; type Props = Readonly<{ type: 'menu' | 'submenu'; @@ -28,10 +29,15 @@ export default function SidebarI18nSubMenu({ type }: Props) { {i18nLabelOptions.map(({ label, locale: localeItem }) => ( ))}