feat : update
This commit is contained in:
@@ -18,7 +18,7 @@ import { Textarea } from "@/components/ui/textarea";
|
||||
import { rarityGradientClass } from "@/lib/catalog/rarity";
|
||||
import { cn } from "@/lib/utils";
|
||||
|
||||
type Character = { key: string; name: string; element: string | null; rarity: number | null; imageUrl: string };
|
||||
type Character = { key: string; name: string; aliases: string[]; element: string | null; rarity: number | null; imageUrl: string };
|
||||
|
||||
export function CreateGuideFlow({ characters, existingKeys }: { characters: Character[]; existingKeys: string[] }) {
|
||||
const router = useRouter();
|
||||
@@ -28,7 +28,12 @@ export function CreateGuideFlow({ characters, existingKeys }: { characters: Char
|
||||
const [overview, setOverview] = useState("");
|
||||
const [pending, startTransition] = useTransition();
|
||||
const existing = useMemo(() => new Set(existingKeys), [existingKeys]);
|
||||
const filtered = characters.filter((character) => character.name.toLowerCase().includes(query.trim().toLowerCase()));
|
||||
const filtered = characters.filter((character) =>
|
||||
[character.name, ...character.aliases]
|
||||
.join(" ")
|
||||
.toLocaleLowerCase("th")
|
||||
.includes(query.trim().toLocaleLowerCase("th")),
|
||||
);
|
||||
|
||||
if (selected) {
|
||||
return (
|
||||
|
||||
Reference in New Issue
Block a user