lbry-desktop/ui/page/help/index.js

20 lines
694 B
JavaScript
Raw Normal View History

2019-09-26 18:07:11 +02:00
import * as PAGES from 'constants/pages';
import { connect } from 'react-redux';
import { doFetchAccessToken } from 'redux/actions/user';
import { selectAccessToken, selectUser } from 'redux/selectors/user';
import { selectDaemonSettings } from 'redux/selectors/settings';
import HelpPage from './view';
2017-07-20 21:03:01 +02:00
const select = state => ({
user: selectUser(state),
2017-07-21 08:23:39 +02:00
accessToken: selectAccessToken(state),
deamonSettings: selectDaemonSettings(state),
2017-07-20 21:03:01 +02:00
});
2017-04-07 07:15:22 +02:00
2019-04-05 00:23:12 +02:00
const perform = (dispatch, ownProps) => ({
doAuth: () => ownProps.history.push(`/$/${PAGES.AUTH}?redirect=/$/${PAGES.HELP}`),
2017-07-21 08:23:39 +02:00
fetchAccessToken: () => dispatch(doFetchAccessToken()),
2017-06-06 06:21:55 +02:00
});
2017-05-22 00:34:12 +02:00
export default connect(select, perform)(HelpPage);