lbry-desktop/ui/component/syncToggle/index.js
zeppi d7856b7618 settings use null when matching current browser language
default language functions

bugfix1

bugfix2

bugfix4
2020-11-23 14:12:31 -05:00

22 lines
900 B
JavaScript

import { SETTINGS } from 'lbry-redux';
import { connect } from 'react-redux';
import { selectUserVerifiedEmail } from 'redux/selectors/user';
import { selectGetSyncErrorMessage } from 'redux/selectors/sync';
import { makeSelectClientSetting, selectLanguage } from 'redux/selectors/settings';
import { doSetWalletSyncPreference } from 'redux/actions/settings';
import { doOpenModal } from 'redux/actions/app';
import SyncToggle from './view';
const select = state => ({
syncEnabled: makeSelectClientSetting(SETTINGS.ENABLE_SYNC)(state),
verifiedEmail: selectUserVerifiedEmail(state),
getSyncError: selectGetSyncErrorMessage(state),
language: selectLanguage(state),
});
const perform = dispatch => ({
setSyncEnabled: value => dispatch(doSetWalletSyncPreference(value)),
openModal: (id, props) => dispatch(doOpenModal(id, props)),
});
export default connect(select, perform)(SyncToggle);