2019-09-04 17:43:37 -04:00
|
|
|
import { connect } from 'react-redux';
|
2021-08-05 21:16:10 +08:00
|
|
|
import { doSetLanguage } from 'redux/actions/settings';
|
|
|
|
import { selectLanguage } from 'redux/selectors/settings';
|
2019-09-04 17:43:37 -04:00
|
|
|
import SettingLanguage from './view';
|
|
|
|
|
2021-08-05 21:16:10 +08:00
|
|
|
const select = (state) => ({
|
2020-11-20 08:21:31 -05:00
|
|
|
language: selectLanguage(state),
|
2019-09-04 17:43:37 -04:00
|
|
|
});
|
|
|
|
|
2021-08-05 21:16:10 +08:00
|
|
|
const perform = (dispatch) => ({
|
|
|
|
setLanguage: (value) => dispatch(doSetLanguage(value)),
|
2019-09-04 17:43:37 -04:00
|
|
|
});
|
|
|
|
|
2020-07-10 17:04:36 -04:00
|
|
|
export default connect(select, perform)(SettingLanguage);
|