Skip to content

Commit 74e00e1

Browse files
committed
remove back button
1 parent aecae90 commit 74e00e1

File tree

2 files changed

+11
-20
lines changed

2 files changed

+11
-20
lines changed

src/components/Nav/Mobile/MenuHeader.tsx

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,26 @@
11
import { SheetClose, SheetTitle } from "@/components/ui/sheet"
22

3+
import { useMobileMenu } from "./MobileMenuContent"
4+
35
import { useTranslation } from "@/hooks/useTranslation"
46

57
const MenuHeader = () => {
68
const { t } = useTranslation("common")
9+
const { setCurrentView } = useMobileMenu()
710

811
return (
912
<div className="flex items-center justify-between p-6">
1013
<SheetTitle className="p-0 text-md uppercase text-body-medium">
1114
{t("site-title")}
1215
</SheetTitle>
13-
<SheetClose className="w-fit text-md">{t("close")}</SheetClose>
16+
<SheetClose
17+
className="w-fit text-md"
18+
onClick={() => {
19+
setCurrentView("menu")
20+
}}
21+
>
22+
{t("close")}
23+
</SheetClose>
1424
</div>
1525
)
1626
}

src/components/Nav/Mobile/MobileLanguagePicker.tsx

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,12 @@
11
"use client"
22

33
import { memo } from "react"
4-
import { ChevronLeft } from "lucide-react"
54
import { useParams } from "next/navigation"
65
import { useLocale } from "next-intl"
76

87
import type { LocaleDisplayInfo } from "@/lib/types"
98

109
import { ButtonLink } from "@/components/ui/buttons/Button"
11-
import { Button } from "@/components/ui/buttons/Button"
1210

1311
import { DEFAULT_LOCALE } from "@/lib/constants"
1412

@@ -41,10 +39,6 @@ const MobileLanguagePicker = memo(
4139
const { languages: sortedLanguages, intlLanguagePreference } =
4240
useLanguagePicker(languages)
4341

44-
const handleBackClick = () => {
45-
setCurrentView("menu")
46-
}
47-
4842
const handleMenuItemSelect = (currentValue: string) => {
4943
push(
5044
// @ts-expect-error -- TypeScript will validate that only known `params`
@@ -69,19 +63,6 @@ const MobileLanguagePicker = memo(
6963

7064
return (
7165
<div className="flex h-full flex-col">
72-
{/* Back navigation */}
73-
<div className="border-b border-body-light p-4">
74-
<Button
75-
variant="ghost"
76-
size="sm"
77-
onClick={handleBackClick}
78-
className="flex items-center gap-2 p-0 text-body"
79-
>
80-
<ChevronLeft className="h-4 w-4" />
81-
Back
82-
</Button>
83-
</div>
84-
8566
{/* Language picker menu */}
8667
<div className="flex-1 overflow-auto">
8768
<LanguagePickerMenu

0 commit comments

Comments
 (0)