mirror of
https://github.com/LemmyNet/lemmy-ui.git
synced 2024-11-25 15:39:25 +00:00
set loading state attribute to false if createPost fails (#1311)
Co-authored-by: Dessalines <dessalines@users.noreply.github.com>
This commit is contained in:
parent
1c26a85fff
commit
64191f2d21
|
@ -224,6 +224,10 @@ export class CreatePost extends Component<
|
|||
if (res.state === "success") {
|
||||
const postId = res.data.post_view.post.id;
|
||||
this.props.history.replace(`/post/${postId}`);
|
||||
} else {
|
||||
this.setState({
|
||||
loading: false,
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue