Skip to content

Commit

Permalink
handleClose bug fix
Browse files Browse the repository at this point in the history
  • Loading branch information
hassanad94 committed Nov 2, 2023
1 parent 7e8b396 commit d3170fb
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@ function PageFunctionsButton() {
setAnchorEl(event.currentTarget);
};

const handleClose = () => {
setAnchorEl(null);
};

const handleOpenRepo = () => {
const url = new URL(process.env.REACT_APP_AdminUrl || sensenetAdminUrl);

Expand Down Expand Up @@ -64,7 +68,7 @@ function PageFunctionsButton() {
horizontal: "right",
}}
open={Boolean(anchorEl)}
onClose={handleOpenRepo}
onClose={handleClose}
>
<MenuItem onClick={handleOpenRepo}>Open Repository</MenuItem>
<MenuItem onClick={logout}>Log out</MenuItem>
Expand Down

0 comments on commit d3170fb

Please sign in to comment.