feat(i18n) : add personal languages and compact weapon exports
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
"use client";
|
||||
|
||||
import { useTranslation } from "@/components/i18n/locale-provider";
|
||||
import { ListTreeIcon } from "lucide-react";
|
||||
|
||||
import { Button } from "@/components/ui/button";
|
||||
@@ -19,19 +20,19 @@ export interface GuideSectionLink {
|
||||
}
|
||||
|
||||
export function SectionDrawer({ sections }: { sections: GuideSectionLink[] }) {
|
||||
const { t } = useTranslation();
|
||||
return (
|
||||
<div className="lg:hidden">
|
||||
<Drawer showSwipeHandle>
|
||||
<DrawerTrigger render={<Button variant="outline" className="w-full" />}>
|
||||
<ListTreeIcon aria-hidden="true" />
|
||||
สารบัญหน้านี้
|
||||
</DrawerTrigger>
|
||||
{t("สารบัญหน้านี้")}</DrawerTrigger>
|
||||
<DrawerContent>
|
||||
<DrawerHeader>
|
||||
<DrawerTitle>สารบัญหน้านี้</DrawerTitle>
|
||||
<DrawerDescription>เลือกหัวข้อเพื่อเลื่อนไปยังเนื้อหา</DrawerDescription>
|
||||
<DrawerTitle>{t("สารบัญหน้านี้")}</DrawerTitle>
|
||||
<DrawerDescription>{t("เลือกหัวข้อเพื่อเลื่อนไปยังเนื้อหา")}</DrawerDescription>
|
||||
</DrawerHeader>
|
||||
<nav aria-label="สารบัญบนมือถือ" className="grid gap-1 overflow-y-auto p-4">
|
||||
<nav aria-label={t("สารบัญบนมือถือ")} className="grid gap-1 overflow-y-auto p-4">
|
||||
{sections.map((section) => (
|
||||
<DrawerClose
|
||||
key={section.id}
|
||||
@@ -42,7 +43,7 @@ export function SectionDrawer({ sections }: { sections: GuideSectionLink[] }) {
|
||||
/>
|
||||
}
|
||||
>
|
||||
{section.label}
|
||||
{t(section.label)}
|
||||
</DrawerClose>
|
||||
))}
|
||||
</nav>
|
||||
|
||||
Reference in New Issue
Block a user