mirror of
https://github.com/aaronpo97/the-biergarten-app.git
synced 2026-02-16 10:42:08 +00:00
Add comments pagination, login and register pages
This commit is contained in:
16
pages/logout/index.tsx
Normal file
16
pages/logout/index.tsx
Normal file
@@ -0,0 +1,16 @@
|
||||
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 <div />;
|
||||
};
|
||||
|
||||
export default LogoutPage;
|
||||
Reference in New Issue
Block a user