From e073096f63a42fdb4cecbe984c4fcd23f1c163f3 Mon Sep 17 00:00:00 2001 From: arttu Date: Mon, 5 Aug 2024 21:10:02 +0300 Subject: [PATCH] Fix login expiration notification not disappearing #no-deploy --- frontend/src/components/Login.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/frontend/src/components/Login.tsx b/frontend/src/components/Login.tsx index 0341b9c5..edad48a9 100644 --- a/frontend/src/components/Login.tsx +++ b/frontend/src/components/Login.tsx @@ -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) => { event.preventDefault()