2021-01-14 18:07:05 +00:00
|
|
|
// Copyright 2019-2021 Signal Messenger, LLC
|
2020-10-30 20:34:04 +00:00
|
|
|
// SPDX-License-Identifier: AGPL-3.0-only
|
|
|
|
|
2019-12-17 20:25:57 +00:00
|
|
|
import { hot } from 'react-hot-loader/root';
|
|
|
|
import * as React from 'react';
|
|
|
|
import { Provider as ReduxProvider } from 'react-redux';
|
|
|
|
import { Router } from 'react-router-dom';
|
|
|
|
import { App } from './app';
|
|
|
|
import { history } from './util/history';
|
|
|
|
import { store } from './store';
|
|
|
|
import { I18n } from './util/i18n';
|
|
|
|
|
2022-06-13 21:39:35 +00:00
|
|
|
const { localeMessages, SignalContext } = window;
|
2019-12-17 20:25:57 +00:00
|
|
|
|
2022-11-18 00:45:19 +00:00
|
|
|
function ColdRoot() {
|
|
|
|
return (
|
|
|
|
<ReduxProvider store={store}>
|
|
|
|
<Router history={history}>
|
|
|
|
<I18n messages={localeMessages} locale={SignalContext.config.locale}>
|
|
|
|
<App
|
|
|
|
executeMenuRole={SignalContext.executeMenuRole}
|
|
|
|
hasCustomTitleBar={SignalContext.OS.hasCustomTitleBar()}
|
|
|
|
/>
|
|
|
|
</I18n>
|
|
|
|
</Router>
|
|
|
|
</ReduxProvider>
|
|
|
|
);
|
|
|
|
}
|
2019-12-17 20:25:57 +00:00
|
|
|
|
|
|
|
export const Root = hot(ColdRoot);
|