diff --git a/app/soapbox/actions/auth.ts b/app/soapbox/actions/auth.ts index 5bdf1f327..d588db80a 100644 --- a/app/soapbox/actions/auth.ts +++ b/app/soapbox/actions/auth.ts @@ -255,6 +255,10 @@ export const logOut = () => export const switchAccount = (accountId: string, background = false) => (dispatch: AppDispatch, getState: () => RootState) => { const account = getState().accounts.get(accountId); + // Clear all stored cache from React Query + queryClient.invalidateQueries(); + queryClient.clear(); + return dispatch({ type: SWITCH_ACCOUNT, account, background }); };