From 2ad2c61721484b50295dd1f0ce1c4770b89f866c Mon Sep 17 00:00:00 2001 From: lonkaars Date: Wed, 10 Feb 2021 11:37:00 +0100 Subject: added logout button in settings --- pages/settings.tsx | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'pages') diff --git a/pages/settings.tsx b/pages/settings.tsx index 0519b27..96c6a2f 100644 --- a/pages/settings.tsx +++ b/pages/settings.tsx @@ -1,4 +1,5 @@ import { CSSProperties } from 'react'; +import * as cookies from 'react-cookies'; import { NavBar } from '../components/navbar'; import { CenteredPage, PageTitle } from '../components/page'; @@ -8,6 +9,7 @@ import { CurrentGameSettings } from '../components/gameSettings'; import EditOutlinedIcon from '@material-ui/icons/EditOutlined'; import VisibilityOutlinedIcon from '@material-ui/icons/VisibilityOutlined'; +import ExitToAppOutlinedIcon from '@material-ui/icons/ExitToAppOutlined'; var SettingsSubsectionStyle: CSSProperties = { marginTop: 24, @@ -69,6 +71,21 @@ export default function SettingsPage() { + +

Uitloggen

+
+ } text="Uitloggen" style={{ + float: "none", + marginLeft: 0 + }} onclick={() => { + cookies.remove("token") + window.location.pathname = "/"; + }}/> +
+
); -- cgit v1.2.3