mirror of https://github.com/mue/mue.git
35 lines
1.1 KiB
JavaScript
35 lines
1.1 KiB
JavaScript
import { render } from 'react-dom';
|
|
|
|
import * as Sentry from '@sentry/react';
|
|
|
|
import App from './App';
|
|
import variables from './modules/variables';
|
|
|
|
import './scss/index.scss';
|
|
// the toast css is based on default so we need to import it
|
|
import 'react-toastify/dist/ReactToastify.min.css';
|
|
|
|
import { initTranslations } from './modules/translations';
|
|
|
|
const languagecode = localStorage.getItem('language') || 'en_GB';
|
|
variables.language = initTranslations(languagecode);
|
|
variables.languagecode = languagecode;
|
|
document.documentElement.lang = languagecode.replace('_', '-');
|
|
|
|
variables.getMessage = (text, optional) =>
|
|
variables.language.getMessage(variables.languagecode, text, optional || {});
|
|
|
|
Sentry.init({
|
|
dsn: variables.constants.SENTRY_DSN,
|
|
defaultIntegrations: false,
|
|
autoSessionTracking: false,
|
|
});
|
|
|
|
const container = document.getElementById('root');
|
|
render(<App />, container);
|
|
|
|
// TODO: Fix marketplace not loading on react 18 before upgrading
|
|
// import { createRoot } from 'react-dom/client';
|
|
// const root = createRoot(container);
|
|
// root.render(<App />);
|