feat: logout

This commit is contained in:
WH64 2025-03-18 16:47:26 +09:00
parent 295f3ecd14
commit 015f401a70

View file

@ -2,10 +2,12 @@ import { useAuthStore } from "../../store/auth";
function Logout() {
const auth = useAuthStore();
auth.clearToken();
if (auth.token !== null)
auth.clearToken();
document.location.href = "/";
return <></>;
return <>Redirecting...</>;
}
export default Logout;