mirror of
https://github.com/aaronpo97/the-biergarten-app.git
synced 2026-02-16 20:13:49 +00:00
17 lines
375 B
TypeScript
17 lines
375 B
TypeScript
import { NextPage } from 'next';
|
|
import { useRouter } from 'next/router';
|
|
import { useEffect } from 'react';
|
|
|
|
const LogoutPage: NextPage = () => {
|
|
const router = useRouter();
|
|
|
|
useEffect(() => {
|
|
document.cookie = 'token=; expires=Thu, 01 Jan 1970 00:00:01 GMT;';
|
|
router.reload();
|
|
router.push('/');
|
|
}, [router]);
|
|
return null;
|
|
};
|
|
|
|
export default LogoutPage;
|