fix : use thai text
This commit is contained in:
@@ -37,6 +37,14 @@ import {
|
|||||||
import { cn } from "@/lib/utils";
|
import { cn } from "@/lib/utils";
|
||||||
|
|
||||||
type Team = PublicGuide["teams"][number];
|
type Team = PublicGuide["teams"][number];
|
||||||
|
const teamSearchTargetLabels: Record<TeamSearchTarget, string> = {
|
||||||
|
all: "ทั้งหมด",
|
||||||
|
team: "ชื่อทีม",
|
||||||
|
character: "ตัวละคร",
|
||||||
|
weapon: "อาวุธ",
|
||||||
|
artifact: "อาร์ติแฟกต์",
|
||||||
|
};
|
||||||
|
|
||||||
type TeamArtifact = {
|
type TeamArtifact = {
|
||||||
key: string;
|
key: string;
|
||||||
name: string;
|
name: string;
|
||||||
@@ -420,6 +428,16 @@ export function TeamSearch({ groups }: { groups: PublicGuide["teamGroups"] }) {
|
|||||||
) : null}
|
) : null}
|
||||||
{activeGroup?.note ? <p className="whitespace-pre-wrap text-muted-foreground">{activeGroup.note}</p> : null}
|
{activeGroup?.note ? <p className="whitespace-pre-wrap text-muted-foreground">{activeGroup.note}</p> : null}
|
||||||
<div className="flex min-w-0 items-center gap-2">
|
<div className="flex min-w-0 items-center gap-2">
|
||||||
|
<div className="relative min-w-0 flex-1">
|
||||||
|
<SearchIcon aria-hidden="true" className="pointer-events-none absolute top-1/2 left-3 size-4 -translate-y-1/2 text-muted-foreground" />
|
||||||
|
<Input
|
||||||
|
aria-label="ค้นหาทีม ตัวละคร อาวุธ หรืออาร์ติแฟกต์"
|
||||||
|
className="pl-9"
|
||||||
|
placeholder="ค้นหาทีม ตัวละคร อาวุธ หรืออาร์ติแฟกต์"
|
||||||
|
value={query}
|
||||||
|
onValueChange={setQuery}
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
<Select value={searchTarget} onValueChange={(value) => {
|
<Select value={searchTarget} onValueChange={(value) => {
|
||||||
if (value) setSearchTarget(value as TeamSearchTarget);
|
if (value) setSearchTarget(value as TeamSearchTarget);
|
||||||
}}>
|
}}>
|
||||||
@@ -427,7 +445,7 @@ export function TeamSearch({ groups }: { groups: PublicGuide["teamGroups"] }) {
|
|||||||
aria-label="เลือกประเภทข้อมูลที่ต้องการค้นหา"
|
aria-label="เลือกประเภทข้อมูลที่ต้องการค้นหา"
|
||||||
className="w-32 shrink-0"
|
className="w-32 shrink-0"
|
||||||
>
|
>
|
||||||
<SelectValue />
|
<SelectValue>{teamSearchTargetLabels[searchTarget]}</SelectValue>
|
||||||
</SelectTrigger>
|
</SelectTrigger>
|
||||||
<SelectContent>
|
<SelectContent>
|
||||||
<SelectGroup>
|
<SelectGroup>
|
||||||
@@ -439,16 +457,6 @@ export function TeamSearch({ groups }: { groups: PublicGuide["teamGroups"] }) {
|
|||||||
</SelectGroup>
|
</SelectGroup>
|
||||||
</SelectContent>
|
</SelectContent>
|
||||||
</Select>
|
</Select>
|
||||||
<div className="relative min-w-0 flex-1">
|
|
||||||
<SearchIcon aria-hidden="true" className="pointer-events-none absolute top-1/2 left-3 size-4 -translate-y-1/2 text-muted-foreground" />
|
|
||||||
<Input
|
|
||||||
aria-label="ค้นหาทีม ตัวละคร อาวุธ หรืออาร์ติแฟกต์"
|
|
||||||
className="pl-9"
|
|
||||||
placeholder="ค้นหาทีม ตัวละคร อาวุธ หรืออาร์ติแฟกต์"
|
|
||||||
value={query}
|
|
||||||
onValueChange={setQuery}
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
<div className="flex items-center gap-2">
|
<div className="flex items-center gap-2">
|
||||||
<ToggleGroup
|
<ToggleGroup
|
||||||
|
|||||||
Reference in New Issue
Block a user