Skip to content

Commit

Permalink
FINALLY FIXED LOGIN/OUT BTN
Browse files Browse the repository at this point in the history
  • Loading branch information
Niceygy committed Jan 31, 2024
1 parent 36d8c64 commit 7f1bdef
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/pages/_app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,15 @@ export default function App({ Component, pageProps }: AppProps) {

useEffect(() => {
listenForUser((user?) => {
if (!user) {
log("User logged out!", "_app/listenForUser");
setButtons([<LoginButton />]);
}
else {
log("User logged in!", "_app/listenForUser");

setButtons([<LogoutButton />]);
}
});
}, []);

Expand Down

0 comments on commit 7f1bdef

Please sign in to comment.