From aa4acb97b3bdbe0023dbc62ae8af3fd89bb47be8 Mon Sep 17 00:00:00 2001 From: esikkala <esko.ikkala@aalto.fi> Date: Tue, 7 Dec 2021 17:12:34 +0200 Subject: [PATCH] Fix default locale --- src/client/index.js | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/client/index.js b/src/client/index.js index 62030c85..5f80a2db 100644 --- a/src/client/index.js +++ b/src/client/index.js @@ -8,19 +8,16 @@ import configureStore from './configureStore' import App from './components/App' import { availableLocales } from './epics/index.js' import { loadLocales } from './actions' - import { updateLocaleToPathname } from './helpers/helpers' import CircularProgress from '@material-ui/core/CircularProgress' import purple from '@material-ui/core/colors/purple' - import './index.css' import '@nosferatu500/react-sortable-tree/style.css' import 'react-redux-toastr/lib/css/react-redux-toastr.min.css' import 'mapbox-gl/dist/mapbox-gl.css' - import portalConfig from './configs/PortalConfig.json' -const { defaultLocale } = portalConfig +const { localeConfig } = portalConfig const store = configureStore() // init locale @@ -31,7 +28,7 @@ if (Object.prototype.hasOwnProperty.call(availableLocales, localeFromUrl)) { locale = localeFromUrl } else { // support urls without a locale - locale = defaultLocale + locale = localeConfig.defaultLocale const { pathname, hash } = window.location const newPathname = updateLocaleToPathname({ pathname, -- GitLab