3c4ccdd2fe
## Why - No memo required (no transformation). - `makeSelect*` is an incorrect pattern. ## Changes - Replaced makeSelectClientSetting with selectClientSetting. - Remove unused selectShowRepostedContent.
18 lines
668 B
JavaScript
18 lines
668 B
JavaScript
import { connect } from 'react-redux';
|
|
import * as SETTINGS from 'constants/settings';
|
|
import { doSetAutoLaunch } from 'redux/actions/settings';
|
|
import { selectClientSetting, selectLanguage } from 'redux/selectors/settings';
|
|
import { doToast } from 'redux/actions/notifications';
|
|
import SettingAutoLaunch from './view';
|
|
|
|
const select = (state) => ({
|
|
autoLaunch: selectClientSetting(state, SETTINGS.AUTO_LAUNCH),
|
|
language: selectLanguage(state),
|
|
});
|
|
|
|
const perform = (dispatch) => ({
|
|
showToast: (options) => dispatch(doToast(options)),
|
|
setAutoLaunch: (value) => dispatch(doSetAutoLaunch(value)),
|
|
});
|
|
|
|
export default connect(select, perform)(SettingAutoLaunch);
|