From 4436a56297bf707696496d8d719f30c277f82691 Mon Sep 17 00:00:00 2001 From: Yann Stepienik Date: Sat, 7 Oct 2023 14:53:20 +0100 Subject: [PATCH] [release] v0.10.0-unstable31 --- client/src/utils/hooks.js | 15 +++++---------- package.json | 2 +- 2 files changed, 6 insertions(+), 11 deletions(-) diff --git a/client/src/utils/hooks.js b/client/src/utils/hooks.js index 1cd4994..aa24f46 100644 --- a/client/src/utils/hooks.js +++ b/client/src/utils/hooks.js @@ -3,16 +3,8 @@ import { useCookies } from 'react-cookie'; import { logout } from '../api/authentication'; function useClientInfos() { - const [cookies] = useCookies(['client-infos', 'jwttoken']); + const [cookies] = useCookies(['client-infos']); - if(cookies['jwttoken'] === undefined) { - // probably the demo or new install - return { - nickname: "", - role: "2" - } - } - let clientInfos = null; try { @@ -25,7 +17,10 @@ function useClientInfos() { }; } catch (error) { console.error('Error parsing client-infos cookie:', error); - logout(); + return { + nickname: "", + role: 2 + }; } } diff --git a/package.json b/package.json index e740ca8..f8d4843 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "cosmos-server", - "version": "0.10.0-unstable30", + "version": "0.10.0-unstable31", "description": "", "main": "test-server.js", "bugs": {