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