Skip to content

Commit

Permalink
Changed handleclose on leave & grow modal, #13
Browse files Browse the repository at this point in the history
  • Loading branch information
Elhamne committed Feb 8, 2023
1 parent e3775e7 commit 4454d28
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/components/modals/GrowFamilyModal.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,8 @@ export default function GrowFamilyModal({ menuOpen, setMenuOpen, theChild }) {
setSubmitDisabled(true);
};
const handleClose = () => {
setOpen(false);
setMenuOpen(false);
setOpen(false);
setInviteRole('');
setShareText('');
};
Expand Down
5 changes: 4 additions & 1 deletion src/components/modals/LeaveFamilyModal.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,10 @@ export default function LeaveFamilyModal({ menuOpen, setMenuOpen, theChild }) {
const [open, setOpen] = useState(false);

const handleOpen = () => setOpen(true);
const handleClose = () => setOpen(false);
const handleClose = () => {
setMenuOpen(false);
setOpen(false);
};
const handleLeave = () => {
dispatch(leaveFamily(theChild.familyId));
handleClose();
Expand Down

0 comments on commit 4454d28

Please sign in to comment.