2019-06-28 09:27:55 +02:00
|
|
|
import { connect } from 'react-redux';
|
2019-12-19 18:22:38 +01:00
|
|
|
import { selectPublishFormValues, doUpdatePublishForm } from 'lbry-redux';
|
2019-06-28 09:27:55 +02:00
|
|
|
import PublishPage from './view';
|
2020-09-04 17:02:30 +02:00
|
|
|
import { selectUser, selectAccessToken } from 'redux/selectors/user';
|
|
|
|
import { doFetchAccessToken } from 'redux/actions/user';
|
2019-06-28 09:27:55 +02:00
|
|
|
|
|
|
|
const select = state => ({
|
|
|
|
...selectPublishFormValues(state),
|
2020-07-03 00:42:04 +02:00
|
|
|
accessToken: selectAccessToken(state),
|
|
|
|
user: selectUser(state),
|
2019-06-28 09:27:55 +02:00
|
|
|
});
|
|
|
|
|
|
|
|
const perform = dispatch => ({
|
|
|
|
updatePublishForm: value => dispatch(doUpdatePublishForm(value)),
|
2020-07-03 00:42:04 +02:00
|
|
|
fetchAccessToken: () => dispatch(doFetchAccessToken()),
|
2019-06-28 09:27:55 +02:00
|
|
|
});
|
|
|
|
|
2020-07-03 00:42:04 +02:00
|
|
|
export default connect(select, perform)(PublishPage);
|