Skip to content

Commit

Permalink
Merge pull request #73 from tgxn/lower_class_changes
Browse files Browse the repository at this point in the history
remove purge button
  • Loading branch information
tgxn authored Oct 24, 2023
2 parents 3e92406 + f996888 commit f09e917
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/components/Actions/PostButtons.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -233,6 +233,8 @@ export const PurgePostButton = ({ report, ...props }) => {
const [confirmOpen, setConfirmOpen] = React.useState(false);
const [purgeReason, setPurgeReason] = React.useState("");

const { userRole } = getSiteData();

const queryClient = useQueryClient();

const { data, callAction, isSuccess, isLoading, error } = useLemmyHttpAction("purgePost");
Expand All @@ -247,6 +249,8 @@ export const PurgePostButton = ({ report, ...props }) => {
}
}, [data]);

if (userRole != "admin") return null;

return (
<>
<BaseActionButton
Expand Down

0 comments on commit f09e917

Please sign in to comment.