From ffc966f3b313d51f09a9c7cb0e47221d4b81a31a Mon Sep 17 00:00:00 2001 From: MartinBraquet Date: Mon, 26 Jan 2026 22:48:28 +0100 Subject: [PATCH] Render keyword examples in the user language --- web/components/filters/search.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/web/components/filters/search.tsx b/web/components/filters/search.tsx index 2ad973fc..6b986c4c 100644 --- a/web/components/filters/search.tsx +++ b/web/components/filters/search.tsx @@ -91,8 +91,8 @@ export const WORDS: string[] = [ "Finance", ] -function getRandomPair(count = 3): string { - const shuffled = [...WORDS].sort(() => 0.5 - Math.random()) +function getRandomPair(words = WORDS, count = 3): string { + const shuffled = [...words].sort(() => 0.5 - Math.random()) return shuffled.slice(0, count).join(", ") } @@ -168,7 +168,7 @@ export const Search = (props: { setTimeout(() => { setPlaceholder(''); setCharIndex(0); - setTextToType(getRandomPair()); // pick new pair + setTextToType(getRandomPair(Object.values(interestChoices))); // pick new pair setIsHolding(false); }, HOLD_TIME); return prev;