File tree Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Original file line number Diff line number Diff line change 1
1
import { Select } from '@chakra-ui/react'
2
2
import { useLingui } from '@lingui/react/macro'
3
- import { i18n } from " @lingui/core" ;
3
+ import { i18n } from ' @lingui/core'
4
4
import { useRouter } from 'next/navigation'
5
5
6
6
export const LanguageSwitcher = ( ) => {
@@ -9,11 +9,16 @@ export const LanguageSwitcher = () => {
9
9
async function dynamicActivate ( event ) {
10
10
const locale = event . target . value
11
11
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 )
14
14
}
15
15
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
+ >
17
22
< option value = 'en' > { t `English` } </ option >
18
23
< option value = 'es' > { t `Spanish` } </ option >
19
24
< option value = 'pt' > { t `Portuguese` } </ option >
You can’t perform that action at this time.
0 commit comments