Skip to content

Commit

Permalink
fix useeffect error
Browse files Browse the repository at this point in the history
  • Loading branch information
Alforoan committed Sep 11, 2024
1 parent 55b886e commit d529272
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions client/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,7 @@ function App() {

const bgColor = useColorModeValue("white", "#313338");

if (isLoading) {
return <Loading isLoading={isLoading} />;
}


useEffect(() => {
if (isToastSuccess.toLowerCase().includes("error")) {
Expand Down Expand Up @@ -65,6 +63,10 @@ function App() {
}
}, [isToastSuccess]);

if (isLoading) {
return <Loading isLoading={isLoading} />;
}

return (
<HelmetProvider>
<Router>
Expand Down

0 comments on commit d529272

Please sign in to comment.