Skip to content

Commit

Permalink
Trocando o removeItem por clear - Front-end. - 3
Browse files Browse the repository at this point in the history
  • Loading branch information
GabrielSS187 committed Feb 11, 2023
1 parent e6aaf67 commit 2a8ecd9
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions front-end/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,10 @@ export function App () {
},
});

window.onload = () => {
localStorage.removeItem("success");
};

useEffect(() => {
const token = localStorage.getItem("token");
const success = localStorage.getItem("success");
Expand All @@ -90,10 +94,6 @@ export function App () {
toastId: `${id}:success-s`
});
};

window.onload = () => {
localStorage.clear();
};
}, [signInFunction.isSuccess, userIsAuthenticated]);

const todosCompleteApi =
Expand Down

1 comment on commit 2a8ecd9

@vercel
Copy link

@vercel vercel bot commented on 2a8ecd9 Feb 11, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.