@@ -2,6 +2,8 @@ import { Languages, SearchIcon } from "lucide-react"
2
2
import { getLocale , getTranslations } from "next-intl/server"
3
3
import { Trigger as TabsTrigger } from "@radix-ui/react-tabs"
4
4
5
+ import type { Lang } from "@/lib/types"
6
+
5
7
import LanguagePicker from "@/components/LanguagePicker"
6
8
import ExpandIcon from "@/components/Nav/MobileMenu/ExpandIcon"
7
9
import LvlAccordion from "@/components/Nav/MobileMenu/LvlAccordion"
@@ -21,6 +23,7 @@ import { SheetCloseOnNavigate } from "@/components/ui/sheet-close-on-navigate"
21
23
import { Tabs , TabsContent , TabsList } from "@/components/ui/tabs"
22
24
23
25
import { cn } from "@/lib/utils/cn"
26
+ import { isLangRightToLeft } from "@/lib/utils/translations"
24
27
import { slugify } from "@/lib/utils/url"
25
28
26
29
import { MOBILE_LANGUAGE_BUTTON_NAME , SECTION_LABELS } from "@/lib/constants"
@@ -42,6 +45,10 @@ export default async function MobileMenu({
42
45
...props
43
46
} : MobileMenuProps ) {
44
47
const t = await getTranslations ( { namespace : "common" } )
48
+ const locale = await getLocale ( )
49
+ const isRtl = isLangRightToLeft ( locale as Lang )
50
+ const side = isRtl ? "right" : "left"
51
+ const dir = isRtl ? "rtl" : "ltr"
45
52
46
53
return (
47
54
< SheetCloseOnNavigate >
@@ -53,7 +60,7 @@ export default async function MobileMenu({
53
60
/>
54
61
</ SheetTrigger >
55
62
< SheetContent
56
- side = "left"
63
+ side = { side }
57
64
hideOverlay
58
65
className = "flex flex-col"
59
66
aria-describedby = ""
@@ -63,6 +70,7 @@ export default async function MobileMenu({
63
70
</ SheetHeader >
64
71
65
72
< Tabs
73
+ dir = { dir }
66
74
defaultValue = "navigation"
67
75
className = "flex min-h-0 flex-1 flex-col"
68
76
>
0 commit comments