Skip to content

Commit

Permalink
Remove votebar from edit notifications
Browse files Browse the repository at this point in the history
  • Loading branch information
InfiniteStash committed Jan 3, 2025
1 parent f6619cb commit 4fbf9cb
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
4 changes: 3 additions & 1 deletion frontend/src/components/editCard/EditCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,14 @@ const CLASSNAME = "EditCard";
interface Props {
edit: EditFragment;
showVotes?: boolean;
showVoteBar?: boolean;
hideDiff?: boolean;
}

const EditCardComponent: FC<Props> = ({
edit,
showVotes = false,
showVoteBar = true,
hideDiff = false,
}) => {
const title = `${edit.operation.toLowerCase()} ${edit.target_type.toLowerCase()}`;
Expand Down Expand Up @@ -92,7 +94,7 @@ const EditCardComponent: FC<Props> = ({
<b className="me-2">Status:</b>
<EditStatus {...edit} />
<EditExpiration edit={edit} />
<VoteBar edit={edit} />
{showVoteBar && <VoteBar edit={edit} />}
</div>
</div>
</Card.Header>
Expand Down
9 changes: 8 additions & 1 deletion frontend/src/pages/notifications/EditNotification.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,12 @@ interface Props {
}

export const EditNotification: FC<Props> = ({ notification }) => {
return <EditCard edit={notification.data.edit} showVotes hideDiff />;
return (
<EditCard
edit={notification.data.edit}
showVotes
hideDiff
showVoteBar={false}
/>
);
};

0 comments on commit 4fbf9cb

Please sign in to comment.