2020-07-28 01:12:59 +02:00
|
|
|
import { connect } from 'react-redux';
|
2020-07-29 04:56:07 +02:00
|
|
|
import { selectIsStillEditing, makeSelectPublishFormValue, doUpdatePublishForm } from 'lbry-redux';
|
2020-07-29 22:30:26 +02:00
|
|
|
import PostEditor from './view';
|
2020-07-28 01:12:59 +02: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 22:30:26 +02:00
|
|
|
export default connect(select, perform)(PostEditor);
|