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

29 lines
1.1 KiB
JavaScript
Raw Normal View History

2019-10-22 02:12:43 +02:00
import * as MODALS from 'constants/modal_types';
import { connect } from 'react-redux';
import { selectDaemonVersionMatched, selectModal } from 'redux/selectors/app';
2019-10-22 02:12:43 +02:00
import { doCheckDaemonVersion, doOpenModal, 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()),
2019-10-22 02:12:43 +02:00
notifyUnlockWallet: shouldTryWithBlankPassword =>
dispatch(doOpenModal(MODALS.WALLET_UNLOCK, { shouldTryWithBlankPassword })),
hideModal: () => dispatch(doHideModal()),
setClientSetting: (key, value) => dispatch(doSetClientSetting(key, value)),
});
2018-07-18 21:48:30 +02:00
export default connect(
select,
perform
)(SplashScreen);