From 79cfddd245d1703921e08185511bcfbf032a149e Mon Sep 17 00:00:00 2001 From: lonkaars Date: Fri, 23 Apr 2021 22:13:53 +0200 Subject: logout page --- pages/logout.tsx | 48 ++++++++++++++++++++++++++++++++++++++++++++++++ styles/loginregister.css | 8 ++++++++ styles/utility.css | 1 + 3 files changed, 57 insertions(+) create mode 100644 pages/logout.tsx diff --git a/pages/logout.tsx b/pages/logout.tsx new file mode 100644 index 0000000..617c974 --- /dev/null +++ b/pages/logout.tsx @@ -0,0 +1,48 @@ +import { useEffect } from 'react'; +import { NavBar } from '../components/navbar'; +import { CenteredPage, PageTitle } from '../components/page'; +import { IconLabelButton, Vierkant } from '../components/ui'; + +import * as cookie from 'react-cookies'; + +import ExitToAppIcon from '@material-ui/icons/ExitToApp'; +import HomeIcon from '@material-ui/icons/Home'; + +function logout() { + cookie.remove('token'); + window.location.href = '/'; +} + +export default function MaintenancePage() { + useEffect(() => { + setTimeout(logout, 3e3); + }, []); + + return
+ + + Uitloggen + +

Je wordt over enkele seconden automatisch uitgelogd...

+
+
+ } + /> + } + /> +
+
+
+
+
+
+
; +} diff --git a/styles/loginregister.css b/styles/loginregister.css index 854aeb2..e274b5e 100644 --- a/styles/loginregister.css +++ b/styles/loginregister.css @@ -11,3 +11,11 @@ .centeredForm .input:nth-last-of-type(2) { margin-bottom: var(--spacing-large); } + +.logout .sidebyside { + width: fit-content; +} + +.logout .sidebyside .button { + margin: 0; +} diff --git a/styles/utility.css b/styles/utility.css index cc358e6..beec066 100644 --- a/styles/utility.css +++ b/styles/utility.css @@ -50,6 +50,7 @@ .floatr { float: right; } .floatl { float: left; } +.floatn { float: none; } .w100m2m { width: calc(100% - var(--spacing-medium)); } -- cgit v1.2.3