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

20 lines
603 B
JavaScript
Raw Normal View History

2017-04-07 07:15:22 +02:00
import React from 'react';
2017-06-06 06:21:55 +02:00
import { connect } from 'react-redux';
2017-04-07 07:15:22 +02:00
2017-06-06 06:21:55 +02:00
import { selectCurrentModal } from 'selectors/app';
import { doCheckUpgradeAvailable, doAlertError } from 'actions/app';
import { doUpdateBalance } from 'actions/wallet';
import App from './view';
2017-04-07 07:15:22 +02:00
2017-06-06 06:21:55 +02:00
const select = state => ({
modal: selectCurrentModal(state)
});
2017-04-07 07:15:22 +02:00
2017-06-06 06:21:55 +02:00
const perform = dispatch => ({
alertError: errorList => dispatch(doAlertError(errorList)),
checkUpgradeAvailable: () => dispatch(doCheckUpgradeAvailable()),
updateBalance: balance => dispatch(doUpdateBalance(balance))
});
2017-04-07 07:15:22 +02:00
2017-06-06 06:21:55 +02:00
export default connect(select, perform)(App);