diff --git a/src/components/layout.js b/src/components/layout.js
index 90de581..0a514a4 100644
--- a/src/components/layout.js
+++ b/src/components/layout.js
@@ -115,43 +115,61 @@ export default function Layout({
+
+
{
+ if (!userSpecificMotd) {
+ return
+ }
+ setShowMotdModal(true)
+ if (userSpecificMotd.seen) {
+ return
+ }
+ fetch(constants.apiUrl + 'infos', {
+ method: 'POST',
+ credentials: 'include',
+ headers: {
+ Accept: 'application/json',
+ 'Content-Type': 'application/json',
+ },
+ body: JSON.stringify({
+ userSpecificMotdSeen: true,
+ }),
+ })
+ .then((resp) => {
+ return resp.json()
+ })
+ .then(() => {
+ refetchGlobalData()
+ })
+ }}
+ style={{ cursor: userSpecificMotd ? 'pointer' : 'default' }}
+ title={
+ userSpecificMotd && !userSpecificMotd.seen
+ ? "You've got Mail!"
+ : ''
+ }
+ >
+ {userSpecificMotd && !userSpecificMotd.seen ? '📬' : 'ðŸ“'}
+
+
UID: {userId || '...'}
+
{
- if (!userSpecificMotd) {
- return
- }
- setShowMotdModal(true)
- if (userSpecificMotd.seen) {
- return
- }
- fetch(constants.apiUrl + 'infos', {
- method: 'POST',
+ fetch(constants.apiUrl + 'logout', {
+ method: 'GET',
credentials: 'include',
headers: {
Accept: 'application/json',
'Content-Type': 'application/json',
},
- body: JSON.stringify({
- userSpecificMotdSeen: true,
- }),
})
- .then((resp) => {
- return resp.json()
- })
- .then(() => {
- refetchGlobalData()
- })
+ location.reload()
}}
- style={{ cursor: userSpecificMotd ? 'pointer' : 'default' }}
- title={
- userSpecificMotd && !userSpecificMotd.seen
- ? "You've got Mail!"
- : ''
- }
>
- {userSpecificMotd && !userSpecificMotd.seen ? '📬' : 'ðŸ“'}
+ Logout
-
User ID: {userId || '...'}
{showMotdModal ? (