Add fallback locale
This commit is contained in:
parent
192c67bda4
commit
36009ad117
1 changed files with 3 additions and 1 deletions
|
@ -151,10 +151,12 @@ function getMatchingLocale(): Locale {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
return undefined;
|
||||
}
|
||||
|
||||
const LocaleProvider: React.FC = ({ children }) => {
|
||||
const [locale] = React.useState(getMatchingLocale());
|
||||
const [locale] = React.useState(getMatchingLocale() || defaultLocale);
|
||||
|
||||
return (
|
||||
<IntlProvider
|
||||
|
|
Loading…
Reference in a new issue