Skip to content

Commit 710d118

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent 72d7571 commit 710d118

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

src/components/language-switcher.js

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { Select } from '@chakra-ui/react'
22
import { useLingui } from '@lingui/react/macro'
3-
import { i18n } from "@lingui/core";
3+
import { i18n } from '@lingui/core'
44
import { useRouter } from 'next/navigation'
55

66
export const LanguageSwitcher = () => {
@@ -9,11 +9,16 @@ export const LanguageSwitcher = () => {
99
async function dynamicActivate(event) {
1010
const locale = event.target.value
1111
const catalog = await import(`../locales/${locale}/messages.js`)
12-
i18n.load(locale, catalog.messages);
13-
i18n.activate(locale);
12+
i18n.load(locale, catalog.messages)
13+
i18n.activate(locale)
1414
}
1515
return (
16-
<Select variant='flushed' size='xs' defaultValue="en" onChange={dynamicActivate}>
16+
<Select
17+
variant='flushed'
18+
size='xs'
19+
defaultValue='en'
20+
onChange={dynamicActivate}
21+
>
1722
<option value='en'>{t`English`}</option>
1823
<option value='es'>{t`Spanish`}</option>
1924
<option value='pt'>{t`Portuguese`}</option>

0 commit comments

Comments
 (0)