New top-level React root: <App />
This commit is contained in:
parent
9a1f722545
commit
173771d34b
22 changed files with 457 additions and 266 deletions
21
ts/state/smart/App.ts
Normal file
21
ts/state/smart/App.ts
Normal file
|
@ -0,0 +1,21 @@
|
|||
// Copyright 2021 Signal Messenger, LLC
|
||||
// SPDX-License-Identifier: AGPL-3.0-only
|
||||
|
||||
import { connect } from 'react-redux';
|
||||
|
||||
import { App } from '../../components/App';
|
||||
import { StateType } from '../reducer';
|
||||
import { getIntl, getTheme } from '../selectors/user';
|
||||
import { mapDispatchToProps } from '../actions';
|
||||
|
||||
const mapStateToProps = (state: StateType) => {
|
||||
return {
|
||||
...state.app,
|
||||
i18n: getIntl(state),
|
||||
theme: getTheme(state),
|
||||
};
|
||||
};
|
||||
|
||||
const smart = connect(mapStateToProps, mapDispatchToProps);
|
||||
|
||||
export const SmartApp = smart(App);
|
Loading…
Add table
Add a link
Reference in a new issue