lbry-desktop/src/ui/component/splash/index.js

27 lines
971 B
JavaScript
Raw Normal View History

import { connect } from 'react-redux';
import { selectDaemonVersionMatched, selectModal } from 'redux/selectors/app';
import { doCheckDaemonVersion, doNotifyUnlockWallet, doHideModal } from 'redux/actions/app';
import { doSetClientSetting } from 'redux/actions/settings';
import * as settings from 'constants/settings';
import SplashScreen from './view';
import { makeSelectClientSetting } from 'redux/selectors/settings';
2017-12-13 22:36:30 +01:00
const select = state => ({
modal: selectModal(state),
2017-12-13 22:36:30 +01:00
daemonVersionMatched: selectDaemonVersionMatched(state),
animationHidden: makeSelectClientSetting(settings.HIDE_SPLASH_ANIMATION)(state),
2017-12-13 22:36:30 +01:00
});
const perform = dispatch => ({
checkDaemonVersion: () => dispatch(doCheckDaemonVersion()),
2018-07-18 21:48:30 +02:00
notifyUnlockWallet: () => dispatch(doNotifyUnlockWallet()),
hideModal: () => dispatch(doHideModal()),
setClientSetting: (key, value) => dispatch(doSetClientSetting(key, value)),
});
2018-07-18 21:48:30 +02:00
export default connect(
select,
perform
)(SplashScreen);