From d3d87be2c30c370f98bae8f1e4c54aac8ded8137 Mon Sep 17 00:00:00 2001 From: Yury Date: Fri, 24 May 2024 15:31:53 +0300 Subject: [PATCH] fix(LogOut): used log out action instead of clearState utility --- src/components/AppBar/AppBar.tsx | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/components/AppBar/AppBar.tsx b/src/components/AppBar/AppBar.tsx index e4b897c..b392d9a 100644 --- a/src/components/AppBar/AppBar.tsx +++ b/src/components/AppBar/AppBar.tsx @@ -10,7 +10,11 @@ import { import { useEffect, useState } from 'react' import { useDispatch, useSelector } from 'react-redux' -import { setAuthState, setMetadataEvent } from '../../store/actions' +import { + setAuthState, + setMetadataEvent, + userLogOutAction +} from '../../store/actions' import { State } from '../../store/rootReducer' import { Dispatch } from '../../store/store' import Username from '../username' @@ -24,7 +28,6 @@ import { } from '../../routes' import { clearAuthToken, - clearState, saveNsecBunkerDelegatedKey, shorten } from '../../utils' @@ -96,7 +99,8 @@ export const AppBar = () => { // clear authToken saved in local storage clearAuthToken() - clearState() + + dispatch(userLogOutAction()) // update nsecBunker delegated key after logout const nostrController = NostrController.getInstance()