mirror of
https://github.com/mue/mue.git
synced 2026-07-18 14:34:12 +02:00
refactor: imports etc
This commit is contained in:
@@ -1,5 +1,4 @@
|
||||
import React from 'react';
|
||||
import ReactDOM from 'react-dom';
|
||||
import { render } from 'react-dom';
|
||||
|
||||
import App from './App';
|
||||
import * as Constants from './modules/constants';
|
||||
@@ -12,8 +11,6 @@ import 'react-toastify/dist/ReactToastify.min.css';
|
||||
import Stats from './modules/helpers/stats';
|
||||
|
||||
// language
|
||||
import merge from '@material-ui/utils/esm/deepmerge';
|
||||
|
||||
const languagecode = localStorage.getItem('language') || 'en_GB';
|
||||
|
||||
// we set things to window. so we avoid passing the translation strings as props to each component
|
||||
@@ -24,7 +21,7 @@ if (languagecode === 'en') {
|
||||
}
|
||||
|
||||
// these are merged so if a string is untranslated it doesn't break mue
|
||||
window.language = merge(require('./translations/en_GB.json'), require(`./translations/${window.languagecode}.json`));
|
||||
window.language = require(`./translations/${window.languagecode}.json`);
|
||||
|
||||
// set html language tag
|
||||
if (window.languagecode !== 'en_GB' || window.languagecode !== 'en_US') {
|
||||
@@ -42,7 +39,7 @@ if (localStorage.getItem('stats') === 'true') {
|
||||
}
|
||||
}
|
||||
|
||||
ReactDOM.render(
|
||||
render(
|
||||
<App/>,
|
||||
document.getElementById('root')
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user