Reset flows cache when logged out
This commit is contained in:
parent
c64594c0a8
commit
34da831213
1 changed files with 7 additions and 1 deletions
|
|
@ -72,7 +72,7 @@ export const TabsContext = createContext<TabsContextType>(
|
|||
export function TabsProvider({ children }: { children: ReactNode }) {
|
||||
const { setErrorData, setNoticeData, setSuccessData } =
|
||||
useContext(alertContext);
|
||||
const { getAuthentication } = useContext(AuthContext);
|
||||
const { getAuthentication, isAuthenticated } = useContext(AuthContext);
|
||||
|
||||
const [tabId, setTabId] = useState("");
|
||||
|
||||
|
|
@ -86,6 +86,12 @@ export function TabsProvider({ children }: { children: ReactNode }) {
|
|||
const [tabsState, setTabsState] = useState<TabsState>({});
|
||||
const [getTweak, setTweak] = useState<tweakType>([]);
|
||||
|
||||
useEffect(() => {
|
||||
if(!isAuthenticated){
|
||||
hardReset();
|
||||
}
|
||||
}, [isAuthenticated])
|
||||
|
||||
const newNodeId = useRef(uid());
|
||||
function incrementNodeId() {
|
||||
newNodeId.current = uid();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue