Skip to content

Commit

Permalink
✨ Allow reverseTakedown from workspace
Browse files Browse the repository at this point in the history
  • Loading branch information
foysalit committed Dec 3, 2024
1 parent 0a55cba commit e2bada7
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
6 changes: 5 additions & 1 deletion components/mod-event/SelectorButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,11 @@ export const ModEventSelectorButton = ({
// Don't show reverse takedown action if subject is not takendown
if (
key === MOD_EVENTS.REVERSE_TAKEDOWN &&
(!subjectStatus?.takendown || !canTakedown)
// show reverse action even when subjectStatus is not takendown if we want to force display it
// however, if the user doesn't have permission for takedowns, don't show it
((!subjectStatus?.takendown &&
!forceDisplayActions.includes(MOD_EVENTS.RESOLVE_APPEAL)) ||
!canTakedown)
) {
return false
}
Expand Down
5 changes: 4 additions & 1 deletion components/workspace/PanelActionForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,10 @@ export const WorkspacePanelActionForm = ({
selectedAction={modEventType}
isSubjectDid={false}
hasBlobs={false}
forceDisplayActions={[MOD_EVENTS.RESOLVE_APPEAL]}
forceDisplayActions={[
MOD_EVENTS.RESOLVE_APPEAL,
MOD_EVENTS.REVERSE_TAKEDOWN,
]}
setSelectedAction={(action) => setModEventType(action)}
/>
<ModEventDetailsPopover modEventType={modEventType} />
Expand Down

0 comments on commit e2bada7

Please sign in to comment.