2019-09-26 18:07:11 +02:00
|
|
|
import * as PAGES from 'constants/pages';
|
2017-12-21 22:08:54 +01:00
|
|
|
import { connect } from 'react-redux';
|
2020-06-15 22:33:03 +02:00
|
|
|
import { doFetchAccessToken } from 'redux/actions/user';
|
|
|
|
import { selectAccessToken, selectUser } from 'redux/selectors/user';
|
2018-06-09 05:38:09 +02:00
|
|
|
import { selectDaemonSettings } from 'redux/selectors/settings';
|
2017-12-21 22:08:54 +01:00
|
|
|
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),
|
2018-06-09 05:38:09 +02:00
|
|
|
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) => ({
|
2019-10-16 07:01:18 +02:00
|
|
|
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
|
|
|
|
2020-06-15 22:33:03 +02:00
|
|
|
export default connect(select, perform)(HelpPage);
|