lbry-desktop/ui/page/settings/index.js
infinite-persistence 6e152a4137
Re-render on language change
Room for improvement: refactor into `<SettingsCard>` so we don't have to repeat this everywhere.
2021-08-23 23:45:24 +08:00

19 lines
673 B
JavaScript

import { connect } from 'react-redux';
import { doEnterSettingsPage, doExitSettingsPage } from 'redux/actions/settings';
import { selectDaemonSettings, selectLanguage } from 'redux/selectors/settings';
import { selectUserVerifiedEmail } from 'redux/selectors/user';
import SettingsPage from './view';
const select = (state) => ({
daemonSettings: selectDaemonSettings(state),
isAuthenticated: selectUserVerifiedEmail(state),
language: selectLanguage(state),
});
const perform = (dispatch) => ({
enterSettings: () => dispatch(doEnterSettingsPage()),
exitSettings: () => dispatch(doExitSettingsPage()),
});
export default connect(select, perform)(SettingsPage);