Merge remote-tracking branch 'origin/main' into use_http_client_dess

This commit is contained in:
Dessalines 2023-06-12 10:19:58 -04:00
commit aea49c38f1

View file

@ -11,7 +11,6 @@ import {
CreatePostLike,
CreatePostReport,
DeletePost,
EditPost,
FeaturePost,
Language,
LockPost,
@ -27,7 +26,6 @@ import { getExternalHost, getHttpBase } from "../../env";
import { i18n } from "../../i18next";
import { BanType, PostFormParams, PurgeType, VoteType } from "../../interfaces";
import { UserService } from "../../services";
import { HttpService } from "../../services/HttpService";
import {
amAdmin,
amCommunityCreator,
@ -1452,16 +1450,11 @@ export class PostListing extends Component<PostListingProps, PostListingState> {
this.setState({ showEdit: false });
}
async handleEditPost(form: EditPost) {
const res = await HttpService.client.editPost(form);
if (res.state === "success") {
// The actual editing is done in the receive for post
handleEditPost() {
this.setState({ showEdit: false });
}
return res;
}
handleShare(i: PostListing) {
const { name, body, id } = i.props.post_view.post;
share({