aboutsummaryrefslogtreecommitdiff
path: root/pages
diff options
context:
space:
mode:
authorlonkaars <l.leblansch@gmail.com>2021-02-10 11:37:00 +0100
committerlonkaars <l.leblansch@gmail.com>2021-02-10 11:37:00 +0100
commit2ad2c61721484b50295dd1f0ce1c4770b89f866c (patch)
treef995ce8665e7ba39e22e3656e0f47e7a9700ec01 /pages
parentcf6416ae99aaba26857bc63f1bbe26954d312efa (diff)
added logout button in settings
Diffstat (limited to 'pages')
-rw-r--r--pages/settings.tsx17
1 files changed, 17 insertions, 0 deletions
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>
);