Fix logging out getting the app stuck on a 'loading' screen
This commit is contained in:
@@ -218,7 +218,7 @@ export const ClientProvider: FC<Props> = ({ children }) => {
|
|||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
clearSession();
|
clearSession();
|
||||||
setInitClientState(undefined);
|
setInitClientState(null);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
[initClientState?.client]
|
[initClientState?.client]
|
||||||
@@ -233,7 +233,7 @@ export const ClientProvider: FC<Props> = ({ children }) => {
|
|||||||
await client.logout(true);
|
await client.logout(true);
|
||||||
await client.clearStores();
|
await client.clearStores();
|
||||||
clearSession();
|
clearSession();
|
||||||
setInitClientState(undefined);
|
setInitClientState(null);
|
||||||
history.push("/");
|
history.push("/");
|
||||||
PosthogAnalytics.instance.setRegistrationType(RegistrationType.Guest);
|
PosthogAnalytics.instance.setRegistrationType(RegistrationType.Guest);
|
||||||
}, [history, initClientState?.client]);
|
}, [history, initClientState?.client]);
|
||||||
|
|||||||
Reference in New Issue
Block a user