This commit is contained in:
mgabdev
2020-05-14 23:17:31 -04:00
parent 59466ccc08
commit a1977ba450
16 changed files with 103 additions and 62 deletions

View File

@@ -141,7 +141,7 @@ class ComposeForm extends ImmutablePureComponent {
return;
}
this.props.onSubmit(this.props.group, this.props.replyToId);
this.props.onSubmit(this.props.group, this.props.replyToId, this.context.router);
}
onSuggestionsClearRequested = () => {

View File

@@ -5,7 +5,7 @@ export default class Compose extends PureComponent {
render () {
return (
<div className={[_s.default, _s.bgPrimary, _s.borderBottom1PX, _s.borderColorSecondary].join(' ')}>
<ComposeFormContainer />
<ComposeFormContainer isStandalone />
</div>
)
}

View File

@@ -12,10 +12,10 @@ import {
} from '../../../actions/compose'
import { me } from '../../../initial_state'
const mapStateToProps = (state, { replyToId }) => {
const mapStateToProps = (state, { replyToId, isStandalone }) => {
const reduxReplyToId = state.getIn(['compose', 'in_reply_to'])
const isModalOpen = state.getIn(['modal', 'modalType']) === 'COMPOSE'
const isModalOpen = state.getIn(['modal', 'modalType']) === 'COMPOSE' || isStandalone
let isMatch;
if (!!reduxReplyToId && !!replyToId && replyToId === reduxReplyToId) {
@@ -55,10 +55,6 @@ const mapStateToProps = (state, { replyToId }) => {
}
}
// console.log("isMatch:", isMatch, reduxReplyToId, replyToId, state.getIn(['compose', 'text']))
// console.log("reduxReplyToId:", reduxReplyToId, isModalOpen)
return {
isMatch,
isModalOpen,
@@ -91,8 +87,8 @@ const mapDispatchToProps = (dispatch, { reduxReplyToId, replyToId }) => ({
dispatch(changeCompose(text, markdown, newReplyToId))
},
onSubmit(group, replyToId) {
dispatch(submitCompose(group, replyToId))
onSubmit(group, replyToId, router) {
dispatch(submitCompose(group, replyToId, router))
},
onClearSuggestions() {