Skip to content
Snippets Groups Projects
Commit aa4acb97 authored by esikkala's avatar esikkala
Browse files

Fix default locale

parent 6f731e74
No related branches found
No related tags found
No related merge requests found
...@@ -8,19 +8,16 @@ import configureStore from './configureStore' ...@@ -8,19 +8,16 @@ import configureStore from './configureStore'
import App from './components/App' import App from './components/App'
import { availableLocales } from './epics/index.js' import { availableLocales } from './epics/index.js'
import { loadLocales } from './actions' import { loadLocales } from './actions'
import { updateLocaleToPathname } from './helpers/helpers' import { updateLocaleToPathname } from './helpers/helpers'
import CircularProgress from '@material-ui/core/CircularProgress' import CircularProgress from '@material-ui/core/CircularProgress'
import purple from '@material-ui/core/colors/purple' import purple from '@material-ui/core/colors/purple'
import './index.css' import './index.css'
import '@nosferatu500/react-sortable-tree/style.css' import '@nosferatu500/react-sortable-tree/style.css'
import 'react-redux-toastr/lib/css/react-redux-toastr.min.css' import 'react-redux-toastr/lib/css/react-redux-toastr.min.css'
import 'mapbox-gl/dist/mapbox-gl.css' import 'mapbox-gl/dist/mapbox-gl.css'
import portalConfig from './configs/PortalConfig.json' import portalConfig from './configs/PortalConfig.json'
const { defaultLocale } = portalConfig
const { localeConfig } = portalConfig
const store = configureStore() const store = configureStore()
// init locale // init locale
...@@ -31,7 +28,7 @@ if (Object.prototype.hasOwnProperty.call(availableLocales, localeFromUrl)) { ...@@ -31,7 +28,7 @@ if (Object.prototype.hasOwnProperty.call(availableLocales, localeFromUrl)) {
locale = localeFromUrl locale = localeFromUrl
} else { } else {
// support urls without a locale // support urls without a locale
locale = defaultLocale locale = localeConfig.defaultLocale
const { pathname, hash } = window.location const { pathname, hash } = window.location
const newPathname = updateLocaleToPathname({ const newPathname = updateLocaleToPathname({
pathname, pathname,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment