zkt24/z1/frontend/pages/logout.tsx

15 lines
344 B
TypeScript
Raw Permalink Normal View History

2024-04-10 09:23:23 +00:00
import { useRouter } from 'next/router';
import React, { useEffect } from 'react';
export default function Logout() {
const router = useRouter();
useEffect(() => {
localStorage.removeItem("Token");
router.push("/login");
})
return (
<div>
<h1>Logging you out ...</h1>
</div>
);
}