This commit is contained in:
MarcEricMartel
2022-11-06 09:10:41 -08:00
parent 550239ca61
commit 107c68eb4e
5 changed files with 49 additions and 7 deletions

View File

@@ -10,6 +10,7 @@ import { useCookies } from "react-cookie";
const Topbar = () => {
const [cookies, setCookie, removeCookie] = useCookies(['name']);
const [user, setLogin] = useState(null);
useEffect(() => {
async function reset() {
await setLogin(await cookies.GMGM ?? null);
@@ -22,9 +23,8 @@ const Topbar = () => {
method: 'POST',
credentials: 'include'
})
await removeCookie("GMGM");
await setLogin(null); // Y U NO WORK?!?
await removeCookie("GMGM");
await setLogin(null); // Y U NO WORK?!?
}
return (