From 6f6761bc7696676d3170f9e299eda8e89df41b34 Mon Sep 17 00:00:00 2001 From: Roland Osborne Date: Fri, 13 Jan 2023 23:01:32 -0800 Subject: [PATCH] fixing logout --- net/web/src/App.js | 6 +++++- net/web/src/context/useAppContext.hook.js | 1 - net/web/src/session/identity/Identity.jsx | 10 +++++++--- 3 files changed, 12 insertions(+), 5 deletions(-) diff --git a/net/web/src/App.js b/net/web/src/App.js index d5dc34a0..5e8c23c7 100644 --- a/net/web/src/App.js +++ b/net/web/src/App.js @@ -33,7 +33,11 @@ function App() { - + } /> diff --git a/net/web/src/context/useAppContext.hook.js b/net/web/src/context/useAppContext.hook.js index 589573e3..fa2ced89 100644 --- a/net/web/src/context/useAppContext.hook.js +++ b/net/web/src/context/useAppContext.hook.js @@ -27,7 +27,6 @@ export function useAppContext(websocket) { const ws = useRef(null); const updateState = (value) => { -console.log(" UPDATE STATE", value); setState((s) => ({ ...s, ...value })) } diff --git a/net/web/src/session/identity/Identity.jsx b/net/web/src/session/identity/Identity.jsx index d35aee25..166cdf62 100644 --- a/net/web/src/session/identity/Identity.jsx +++ b/net/web/src/session/identity/Identity.jsx @@ -1,4 +1,4 @@ -import { Button, Modal, Dropdown, Menu, Tooltip } from 'antd'; +import { Modal, Dropdown, Menu, Tooltip } from 'antd'; import { Logo } from 'logo/Logo'; import { IdentityWrapper, ErrorNotice, InfoNotice } from './Identity.styled'; import { useIdentity } from './useIdentity.hook'; @@ -10,9 +10,12 @@ export function Identity({ openAccount, openCards, cardUpdated }) { const logout = () => { Modal.confirm({ - title: 'you sure you want to logout?', + title: 'Are you sure you want to logout?', icon: , - footer:
, + onOk() { + actions.logout(); + }, + onCancel() {}, }); } @@ -68,3 +71,4 @@ export function Identity({ openAccount, openCards, cardUpdated }) { ); } +