- bump up version to 4.0.6

- update dependencies
- remove test phase from CI script
- lint and format all files
This commit is contained in:
Amruth Pillai
2024-03-10 10:35:23 +01:00
parent ec77d13ebd
commit b47b7824ff
23 changed files with 65 additions and 69 deletions

View File

@ -18,12 +18,8 @@ export const LocaleProvider = ({ children }: Props) => {
const userLocale = useAuthStore((state) => state.user?.locale);
useEffect(() => {
const detectedLocale = detect(
fromUrl("locale"),
fromStorage("locale"),
userLocale,
defaultLocale,
)!;
const detectedLocale =
detect(fromUrl("locale"), fromStorage("locale"), userLocale, defaultLocale) ?? defaultLocale;
// Activate the locale only if it's supported
if (languages.some((lang) => lang.locale === detectedLocale)) {