lbry-desktop/ui/component/postEditor/index.js
zeppi ee9f63a161 integrate all the things
bugfix

wip

flow

fix

cleaning

clean
2021-10-15 23:49:41 -04:00

20 lines
838 B
JavaScript

import { connect } from 'react-redux';
import { doUpdatePublishForm } from 'redux/actions/publish';
import { selectIsStillEditing, makeSelectPublishFormValue } from 'redux/selectors/publish';
import { makeSelectStreamingUrlForUri } from 'redux/selectors/file_info';
import { doPlayUri } from 'redux/actions/content';
import PostEditor from './view';
const select = (state, props) => ({
filePath: makeSelectPublishFormValue('filePath')(state),
fileText: makeSelectPublishFormValue('fileText')(state),
streamingUrl: makeSelectStreamingUrlForUri(props.uri)(state),
isStillEditing: selectIsStillEditing(state),
});
const perform = (dispatch) => ({
updatePublishForm: (value) => dispatch(doUpdatePublishForm(value)),
fetchStreamingUrl: (uri) => dispatch(doPlayUri(uri)),
});
export default connect(select, perform)(PostEditor);