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 }) {
|
export function TabsProvider({ children }: { children: ReactNode }) {
|
||||||
const { setErrorData, setNoticeData, setSuccessData } =
|
const { setErrorData, setNoticeData, setSuccessData } =
|
||||||
useContext(alertContext);
|
useContext(alertContext);
|
||||||
const { getAuthentication } = useContext(AuthContext);
|
const { getAuthentication, isAuthenticated } = useContext(AuthContext);
|
||||||
|
|
||||||
const [tabId, setTabId] = useState("");
|
const [tabId, setTabId] = useState("");
|
||||||
|
|
||||||
|
|
@ -86,6 +86,12 @@ export function TabsProvider({ children }: { children: ReactNode }) {
|
||||||
const [tabsState, setTabsState] = useState<TabsState>({});
|
const [tabsState, setTabsState] = useState<TabsState>({});
|
||||||
const [getTweak, setTweak] = useState<tweakType>([]);
|
const [getTweak, setTweak] = useState<tweakType>([]);
|
||||||
|
|
||||||
|
useEffect(() => {
|
||||||
|
if(!isAuthenticated){
|
||||||
|
hardReset();
|
||||||
|
}
|
||||||
|
}, [isAuthenticated])
|
||||||
|
|
||||||
const newNodeId = useRef(uid());
|
const newNodeId = useRef(uid());
|
||||||
function incrementNodeId() {
|
function incrementNodeId() {
|
||||||
newNodeId.current = uid();
|
newNodeId.current = uid();
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue