From db46845eecb1427d7f5ac9e80f118918709dd84b Mon Sep 17 00:00:00 2001 From: mrevanzak Date: Sun, 30 Jun 2024 11:19:05 +0700 Subject: [PATCH] refactor: code improvement --- apps/web/src/components/language-toggle.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/web/src/components/language-toggle.tsx b/apps/web/src/components/language-toggle.tsx index 1eace1c..4b5162e 100644 --- a/apps/web/src/components/language-toggle.tsx +++ b/apps/web/src/components/language-toggle.tsx @@ -35,7 +35,7 @@ export function LanguageToggle() { selectedKeys={[locale]} onSelectionChange={async (keys) => { if (keys === "all") return; - await changeLanguage(Array.from(keys).at(0) as "en" | "id"); + await changeLanguage(Array.from(keys).at(0)?.toString() ?? "en"); }} > English