Skip to content

Commit

Permalink
OpenConceptLab/ocl_issues#985 | fixing user edit drawer
Browse files Browse the repository at this point in the history
  • Loading branch information
snyaggarwal committed Oct 20, 2021
1 parent 1ba02c4 commit a6a23a9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/components/common/CommonFormDrawer.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ const CommonFormDrawer = ({ isOpen, onClose, formComponent, size, ...rest }) =>
const className = 'custom-drawer ' + (size || 'medium')
const [open, setOpen] = React.useState(isOpen);
const onDrawerClose = () => setOpen(() => {
onClose(); return false;
onClose();
return false;
})

React.useEffect(() => setOpen(isOpen), [isOpen])
Expand Down
2 changes: 1 addition & 1 deletion src/components/users/UserHomeDetails.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ const UserHomeDetails = ({ user, isLoading }) => {
}
<CommonFormDrawer
isOpen={editForm}
onClose={onEditClick}
onClose={onEditClose}
formComponent={
<UserForm
loggedIn={user.username === getCurrentUserUsername()}
Expand Down

0 comments on commit a6a23a9

Please sign in to comment.