} from "../../services/HttpService";
import {
Choice,
- QueryParams,
enableDownvotes,
enableNsfw,
getIdFromString,
- getQueryParams,
myAuth,
setIsoData,
} from "../../utils";
+import { getQueryParams } from "../../utils/helpers/get-query-params";
+import type { QueryParams } from "../../utils/types/query-params";
import { HtmlTags } from "../common/html-tags";
import { Spinner } from "../common/icon";
import { PostForm } from "./post-form";
</h5>
) : (
<div className="row">
- <div className="col-12 col-lg-6 offset-lg-3 mb-4">
+ <div
+ id="createPostForm"
+ className="col-12 col-lg-6 offset-lg-3 mb-4"
+ >
<h5>{i18n.t("create_post")}</h5>
<PostForm
onCreate={this.handlePostCreate}
if (res.state === "success") {
const postId = res.data.post_view.post.id;
this.props.history.replace(`/post/${postId}`);
+ } else {
+ this.setState({
+ loading: false,
+ });
}
}