mirror of
https://github.com/TheRealOwenRees/chess-scribe-website.git
synced 2026-07-23 01:46:57 +00:00
check for existing user on remount
This commit is contained in:
@@ -3,7 +3,7 @@ import { useLichessOAuth } from "#/hooks/useLichessOAuth.ts";
|
||||
|
||||
const LichessButton = () => {
|
||||
const { lichessLogin, lichessLogout } = useLichessOAuth();
|
||||
const { user, setUser, logout } = useLichessUser();
|
||||
const { user } = useLichessUser();
|
||||
|
||||
const onClickHandler = () => {
|
||||
return user?.isLoggedIn ? lichessLogout() : lichessLogin();
|
||||
|
||||
Reference in New Issue
Block a user