Skip to content

Commit

Permalink
Merge branch 'Development' into issue-525/remove-dob-from-profile
Browse files Browse the repository at this point in the history
  • Loading branch information
leekahung authored Nov 17, 2023
2 parents 1fdb132 + 9b3bac8 commit 9596cae
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 12 deletions.
2 changes: 1 addition & 1 deletion src/components/Modals/ConfirmationModal.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ const ConfirmationModal = ({

const confirmButton = () =>
isLogout ? (
<LogoutButton>
<LogoutButton onLogout={() => localStorage.clear()}>
<ConfirmationButton
title={title}
confirmFunction={confirmFunction}
Expand Down
1 change: 0 additions & 1 deletion src/components/NavBar/NavBar.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ const NavBar = () => {
const handleLogout = async () => {
setProcessing(true);
try {
localStorage.clear();
addNotification('success', 'You have been logged out');
} catch (e) {
addNotification('error', `Log out failed. Reason: ${e.message}`);
Expand Down
12 changes: 2 additions & 10 deletions src/components/Notification/InactivityMessage.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -102,16 +102,8 @@ const InactivityMessage = () => {
</DialogContentText>
</DialogContent>
<DialogActions>
<LogoutButton>
<Button
variant="outlined"
color="error"
endIcon={<LogoutIcon />}
onClick={() => {
localStorage.clear();
logout();
}}
>
<LogoutButton onLogout={() => localStorage.clear()}>
<Button variant="outlined" color="error" endIcon={<LogoutIcon />}>
Log Out
</Button>
</LogoutButton>
Expand Down

0 comments on commit 9596cae

Please sign in to comment.