2020-07-27 18:12:59 -05:00
|
|
|
import { connect } from 'react-redux';
|
2020-07-28 21:56:07 -05:00
|
|
|
import { selectIsStillEditing, makeSelectPublishFormValue, doUpdatePublishForm } from 'lbry-redux';
|
2020-07-29 15:30:26 -05:00
|
|
|
import PostEditor from './view';
|
2020-07-27 18:12:59 -05:00
|
|
|
|
|
|
|
const select = (state, props) => ({
|
|
|
|
filePath: makeSelectPublishFormValue('filePath')(state),
|
|
|
|
fileText: makeSelectPublishFormValue('fileText')(state),
|
|
|
|
isStillEditing: selectIsStillEditing(state),
|
|
|
|
});
|
|
|
|
|
|
|
|
const perform = dispatch => ({
|
|
|
|
updatePublishForm: value => dispatch(doUpdatePublishForm(value)),
|
|
|
|
});
|
|
|
|
|
2020-07-29 15:30:26 -05:00
|
|
|
export default connect(select, perform)(PostEditor);
|