feat: logout

This commit is contained in:
Project_IO 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() { function Logout() {
const auth = useAuthStore(); const auth = useAuthStore();
if (auth.token !== null)
auth.clearToken(); auth.clearToken();
document.location.href = "/"; document.location.href = "/";
return <></>;
return <>Redirecting...</>;
} }
export default Logout; export default Logout;