Skip to content

Commit

Permalink
Update type for support languages
Browse files Browse the repository at this point in the history
  • Loading branch information
ZaneH committed Jul 26, 2022
1 parent 2b3c505 commit f48b5b9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
4 changes: 1 addition & 3 deletions src/components/KVProvider/KVProvider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,7 @@ const KVProvider: FC<KVContextType> = ({ children }) => {
id: 0,
name: 'default',
})
const [language, setLanguage] = useState(
AVAILABLE_LANGUAGES.en.code as SupportedLanguagesType
)
const [language, setLanguage] = useState(AVAILABLE_LANGUAGES.en.code)
const [isSentryOn, setIsSentryOn] = useState(true)
const { i18n } = useTranslation()

Expand Down
6 changes: 3 additions & 3 deletions src/utils/languages.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
export type SupportedLanguagesType = 'en' | 'fr'

export type LanguageOptionType = {
name: string
code: string
code: SupportedLanguagesType
}

export type SupportedLanguagesType = 'en' | 'fr'

export const AVAILABLE_LANGUAGES: {
[key in SupportedLanguagesType]: LanguageOptionType
} = {
Expand Down

0 comments on commit f48b5b9

Please sign in to comment.