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 { useCallback, useEffect, useRef, useState, type ReactNode } from "react";
|
||||
import { ChevronLeftIcon, ChevronRightIcon } from "lucide-react";
|
||||
|
||||
@@ -15,6 +16,7 @@ export function ScrollableNav({
|
||||
children: ReactNode;
|
||||
className?: string;
|
||||
}) {
|
||||
const { t } = useTranslation();
|
||||
const navRef = useRef<HTMLElement>(null);
|
||||
const [canScrollLeft, setCanScrollLeft] = useState(false);
|
||||
const [canScrollRight, setCanScrollRight] = useState(false);
|
||||
@@ -51,13 +53,13 @@ export function ScrollableNav({
|
||||
className="shrink-0 sm:hidden"
|
||||
disabled={!canScrollLeft}
|
||||
onClick={() => scroll(-1)}
|
||||
aria-label="เลื่อนเมนูไปทางซ้าย"
|
||||
aria-label={t("เลื่อนเมนูไปทางซ้าย")}
|
||||
>
|
||||
<ChevronLeftIcon />
|
||||
</Button>
|
||||
<nav
|
||||
ref={navRef}
|
||||
aria-label={ariaLabel}
|
||||
aria-label={t(ariaLabel ?? "Navigation")}
|
||||
className="flex min-w-0 flex-1 gap-1 overflow-x-auto scrollbar-none"
|
||||
>
|
||||
{children}
|
||||
@@ -69,7 +71,7 @@ export function ScrollableNav({
|
||||
className="shrink-0 sm:hidden"
|
||||
disabled={!canScrollRight}
|
||||
onClick={() => scroll(1)}
|
||||
aria-label="เลื่อนเมนูไปทางขวา"
|
||||
aria-label={t("เลื่อนเมนูไปทางขวา")}
|
||||
>
|
||||
<ChevronRightIcon />
|
||||
</Button>
|
||||
|
||||
Reference in New Issue
Block a user