lbry-desktop/ui/component/settingAccountPassword/index.js
infiinte-persistence 1a3669ca76 Patch for "7839bbf2: Fix language-change not applied to all components immediately"
- Missed the "Account Password" card that is used for authenticated case.
- For cards that are only used in Settings, listen to the language change in "select" instead of passing in as a prop. I think this is cleaner.
2020-07-06 09:52:16 -04:00

20 lines
756 B
JavaScript

import { connect } from 'react-redux';
import { selectUser, selectPasswordSetSuccess, selectPasswordSetError } from 'redux/selectors/user';
import { makeSelectClientSetting } from 'redux/selectors/settings';
import { doUserPasswordSet, doClearPasswordEntry } from 'redux/actions/user';
import { doToast } from 'redux/actions/notifications';
import UserSignIn from './view';
import * as SETTINGS from 'constants/settings';
const select = state => ({
user: selectUser(state),
passwordSetSuccess: selectPasswordSetSuccess(state),
passwordSetError: selectPasswordSetError(state),
language: makeSelectClientSetting(SETTINGS.LANGUAGE)(state),
});
export default connect(select, {
doUserPasswordSet,
doToast,
doClearPasswordEntry,
})(UserSignIn);