lbry-desktop/ui/component/syncPassword/index.js

23 lines
740 B
JavaScript
Raw Normal View History

import { connect } from 'react-redux';
import { doGetSync, selectGetSyncIsPending, selectUserEmail, selectSyncApplyPasswordError } from 'lbryinc';
import { doSetClientSetting } from 'redux/actions/settings';
2019-10-28 15:04:37 +01:00
import { doSignOut } from 'redux/actions/app';
import SyncPassword from './view';
const select = state => ({
getSyncIsPending: selectGetSyncIsPending(state),
email: selectUserEmail(state),
passwordError: selectSyncApplyPasswordError(state),
});
const perform = dispatch => ({
2020-01-03 21:43:49 +01:00
getSync: (password, cb) => dispatch(doGetSync(password, cb)),
setClientSetting: (key, value) => dispatch(doSetClientSetting(key, value)),
2019-10-28 15:04:37 +01:00
signOut: () => dispatch(doSignOut()),
});
export default connect(
select,
perform
)(SyncPassword);