Notification channel Delete:
attempt to add the delete button to the notifications view
This commit is contained in:
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
|
||||
|
||||
Reference in new issue
Block a user