Merge branch 'hotfix/AW-195-fix-error' into 'main'
hotfix/AW-195-fix-error See merge request witapp/aura-webapp!337
This commit is contained in:
commit
b961bffa0b
@ -15,6 +15,7 @@ import {
|
||||
getTranslationJSON,
|
||||
ELocalesPlacement,
|
||||
language,
|
||||
setLanguage,
|
||||
} from "./locales";
|
||||
import App from "./components/App";
|
||||
import metricService from "./services/metric/metricService";
|
||||
@ -27,6 +28,7 @@ pdfjs.GlobalWorkerOptions.workerSrc = `https://unpkg.com/pdfjs-dist@${pdfjs.vers
|
||||
const environments = import.meta.env;
|
||||
|
||||
const init = async () => {
|
||||
await setLanguage();
|
||||
const api = createApi();
|
||||
const currentPlacement = localStorage.getItem(
|
||||
"locales-placement"
|
||||
|
||||
@ -23,8 +23,12 @@ export const getClientLocale = async () => {
|
||||
}
|
||||
|
||||
export const getClientTimezone = () => Intl.DateTimeFormat().resolvedOptions().timeZone
|
||||
export const language = await getClientLocale()
|
||||
export const fallbackLng = 'en'
|
||||
export let language: string = fallbackLng;
|
||||
|
||||
export const setLanguage = async () => {
|
||||
language = await getClientLocale();
|
||||
};
|
||||
|
||||
const omitKeys = ['href', 'title', 'url_slug', 'type']
|
||||
// const isWeb = (group: Elements.ElementGroup) => group.name === 'web'
|
||||
|
||||
Loading…
Reference in New Issue
Block a user