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

20 lines
714 B
JavaScript
Raw Normal View History

import { connect } from 'react-redux';
import { selectPublishFormValues } from 'redux/selectors/publish';
import { doUpdatePublishForm } from 'redux/actions/publish';
import PublishAdditionalOptions from './view';
2020-09-04 17:02:30 +02:00
import { selectUser, selectAccessToken } from 'redux/selectors/user';
import { doFetchAccessToken } from 'redux/actions/user';
const select = (state) => ({
...selectPublishFormValues(state),
accessToken: selectAccessToken(state),
user: selectUser(state),
});
const perform = (dispatch) => ({
updatePublishForm: (value) => dispatch(doUpdatePublishForm(value)),
fetchAccessToken: () => dispatch(doFetchAccessToken()),
});
export default connect(select, perform)(PublishAdditionalOptions);