From 62abc97e8ce012e9e90326f273472c8033283bf2 Mon Sep 17 00:00:00 2001 From: Gabriel Silva Date: Sat, 11 Feb 2023 17:26:51 -0300 Subject: [PATCH] Trocando o removeItem por clear - Front-end. - 4 --- front-end/src/App.tsx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/front-end/src/App.tsx b/front-end/src/App.tsx index ba8d0a4..b6d523c 100644 --- a/front-end/src/App.tsx +++ b/front-end/src/App.tsx @@ -73,10 +73,6 @@ export function App () { }, }); - window.onload = () => { - localStorage.removeItem("success"); - }; - useEffect(() => { const token = localStorage.getItem("token"); const success = localStorage.getItem("success"); @@ -94,6 +90,10 @@ export function App () { toastId: `${id}:success-s` }); }; + + window.onload = () => { + window.localStorage.removeItem("success"); + }; }, [signInFunction.isSuccess, userIsAuthenticated]); const todosCompleteApi =