mirror of
https://github.com/LemmyNet/lemmy-ui.git
synced 2024-11-09 10:02:12 +00:00
Fix navigation warnings.
This commit is contained in:
parent
2529322afd
commit
32e82a93f4
|
@ -136,7 +136,11 @@ export class MarkdownTextArea extends Component<
|
||||||
return (
|
return (
|
||||||
<form id={this.formId} onSubmit={linkEvent(this, this.handleSubmit)}>
|
<form id={this.formId} onSubmit={linkEvent(this, this.handleSubmit)}>
|
||||||
<NavigationPrompt
|
<NavigationPrompt
|
||||||
when={!!this.state.content && !this.state.submitted}
|
when={
|
||||||
|
!this.props.hideNavigationWarnings &&
|
||||||
|
!!this.state.content &&
|
||||||
|
!this.state.submitted
|
||||||
|
}
|
||||||
/>
|
/>
|
||||||
<div className="form-group row">
|
<div className="form-group row">
|
||||||
<div className={`col-sm-12`}>
|
<div className={`col-sm-12`}>
|
||||||
|
|
|
@ -225,8 +225,6 @@ export class CreatePost extends Component<
|
||||||
const postId = res.data.post_view.post.id;
|
const postId = res.data.post_view.post.id;
|
||||||
this.props.history.replace(`/post/${postId}`);
|
this.props.history.replace(`/post/${postId}`);
|
||||||
}
|
}
|
||||||
|
|
||||||
return res;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static fetchInitialData({
|
static fetchInitialData({
|
||||||
|
|
Loading…
Reference in a new issue