Skip to content

Commit

Permalink
Fix login expiration notification not disappearing #no-deploy
Browse files Browse the repository at this point in the history
  • Loading branch information
ShootingStar91 committed Aug 5, 2024
1 parent 3d8e5f1 commit e073096
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion frontend/src/components/Login.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,9 @@ export const Login = () => {

useEffect(() => {
if (loginHadExpired) notify('Your login expired. Please log in again.')
}, [loginHadExpired, notify])
// Putting notify into this causes the notification to not disappear, so don't do it.
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [location.pathname])

const login = async (event: FormEvent<HTMLFormElement>) => {
event.preventDefault()
Expand Down

0 comments on commit e073096

Please sign in to comment.