Fixes broken flow
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
export const getBrowserLocale = enabledLanguages => {
|
||||
const localeWithVariant = window.navigator.language.replace('-', '_');
|
||||
const localeWithoutVariant = localeWithVariant.split('_')[0];
|
||||
return enabledLanguages.find(
|
||||
lang =>
|
||||
lang.iso_639_1_code === localeWithVariant ||
|
||||
lang.iso_639_1_code === localeWithoutVariant
|
||||
)?.iso_639_1_code;
|
||||
};
|
||||
|
||||
export const getBrowserTimezone = () => {
|
||||
return Intl.DateTimeFormat().resolvedOptions().timeZone;
|
||||
};
|
||||
Reference in New Issue
Block a user