From 2ad2c61721484b50295dd1f0ce1c4770b89f866c Mon Sep 17 00:00:00 2001
From: lonkaars <l.leblansch@gmail.com>
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/settings.tsx')

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() {
 						<CurrentGameSettings/>
 					</div>
 				</Vierkant>
+				<Vierkant fullwidth>
+					<h2>Uitloggen</h2>
+					<div style={{
+						width: "100%",
+						textAlign: "center"
+					}}>
+						<IconLabelButton icon={<ExitToAppOutlinedIcon/>} text="Uitloggen" style={{
+							float: "none",
+							marginLeft: 0
+						}} onclick={() => {
+							cookies.remove("token")
+							window.location.pathname = "/";
+						}}/>
+					</div>
+				</Vierkant>
 			</CenteredPage>
 		</div>
 	);
-- 
cgit v1.2.3

