{(showVotingButtons || inModqueue) && (
- {inModqueue && }
+ {inModqueue && }
{!inModqueue && (
<>
diff --git a/src/features/post/postSlice.ts b/src/features/post/postSlice.ts
index fae7f5ab77..0245a29805 100644
--- a/src/features/post/postSlice.ts
+++ b/src/features/post/postSlice.ts
@@ -1,5 +1,5 @@
import { createAsyncThunk, createSlice, PayloadAction } from "@reduxjs/toolkit";
-import { PostView } from "lemmy-js-client";
+import { Post, PostView } from "lemmy-js-client";
import {
clientSelector,
@@ -410,16 +410,16 @@ export const postHiddenByIdSelector = (state: RootState) => {
};
export const modRemovePost =
- (postId: number, removed: boolean, reason?: string) =>
+ (post: Post, removed: boolean, reason?: string) =>
async (dispatch: AppDispatch, getState: () => RootState) => {
const response = await clientSelector(getState())?.removePost({
- post_id: postId,
+ post_id: post.id,
removed,
reason,
});
dispatch(receivedPosts([response.post_view]));
- await dispatch(resolvePostReport(postId));
+ await dispatch(resolvePostReport(post.id));
};
export const modLockPost =
diff --git a/src/features/shared/markdown/editing/modal/contents/ItemReplyingTo.tsx b/src/features/shared/markdown/editing/modal/contents/ItemReplyingTo.tsx
index 972d9aac31..e1d2430fe5 100644
--- a/src/features/shared/markdown/editing/modal/contents/ItemReplyingTo.tsx
+++ b/src/features/shared/markdown/editing/modal/contents/ItemReplyingTo.tsx
@@ -6,6 +6,7 @@ import CommentContent from "#/features/comment/CommentContent";
import Ago from "#/features/labels/Ago";
import Edited from "#/features/labels/Edited";
import Vote from "#/features/labels/Vote";
+import useCanModerate from "#/features/moderation/useCanModerate";
import { preventModalSwipeOnTextSelection } from "#/helpers/ionic";
import { getHandle } from "#/helpers/lemmy";
@@ -16,6 +17,7 @@ interface ItemReplyingToProps {
}
export default function ItemReplyingTo({ item }: ItemReplyingToProps) {
+ const canModerate = useCanModerate(item.community);
const payload = "comment" in item ? item.comment : item.post;
return (
@@ -30,7 +32,11 @@ export default function ItemReplyingTo({ item }: ItemReplyingToProps) {
{...preventModalSwipeOnTextSelection}
className={styles.commentContentWrapper}
>
-
+
);