Skip to content

Commit

Permalink
refactor: code improvement
Browse files Browse the repository at this point in the history
  • Loading branch information
mrevanzak committed Jun 30, 2024
1 parent cda34b9 commit db46845
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion apps/web/src/components/language-toggle.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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");
}}
>
<DropdownItem key="en">English</DropdownItem>
Expand Down

0 comments on commit db46845

Please sign in to comment.