Fix logging out getting the app stuck on a 'loading' screen

This commit is contained in:
Robin Townsend
2023-08-09 12:00:13 -04:00
parent ec5b245610
commit b96b3dd5ef

View File

@@ -218,7 +218,7 @@ export const ClientProvider: FC<Props> = ({ children }) => {
});
} else {
clearSession();
setInitClientState(undefined);
setInitClientState(null);
}
},
[initClientState?.client]
@@ -233,7 +233,7 @@ export const ClientProvider: FC<Props> = ({ children }) => {
await client.logout(true);
await client.clearStores();
clearSession();
setInitClientState(undefined);
setInitClientState(null);
history.push("/");
PosthogAnalytics.instance.setRegistrationType(RegistrationType.Guest);
}, [history, initClientState?.client]);