Notification channel Delete:

attempt to add the delete button to the notifications view
This commit is contained in:
Luis Sousa committed 2025-07-02 17:14:39 +01:00
1 parent 731f2e12fb
commit 85b13686a4
3 files changed
+36 -5

No files matched your search

@@ -22,7 +22,10 @@ const ActionMenu = ({ notification, onDelete }) => {
setAnchorEl(event.currentTarget);
};
const handleClose = () => {
const handleClose = (event) => {
if (event) {
event.stopPropagation();
}
setAnchorEl(null);
};
@@ -32,7 +35,8 @@ const ActionMenu = ({ notification, onDelete }) => {
handleClose();
};
const handleConfigure = () => {
const handleConfigure = (e) => {
e.stopPropagation();
navigate(`/notifications/${notification._id}`);
handleClose();
};
@@ -40,8 +44,9 @@ const ActionMenu = ({ notification, onDelete }) => {
return (
<>
<IconButton
aria-label="monitor actions"
aria-label="notification actions"
onClick={handleClick}
onMouseDown={(e) => e.stopPropagation()}
>
<SettingsOutlinedIcon />
</IconButton>
@@ -51,6 +56,8 @@ const ActionMenu = ({ notification, onDelete }) => {
open={open}
onClose={handleClose}
anchorOrigin={{ vertical: "bottom", horizontal: "right" }}
onClick={(e) => e.stopPropagation()}
onMouseDown={(e) => e.stopPropagation()}
>
<MenuItem onClick={handleConfigure}>Configure</MenuItem>
<MenuItem