Cache user on auth provider re-render (#1793)

This commit is contained in:
Wojciech Mista 2022-01-31 09:33:04 +01:00 committed by GitHub
parent 517d3f9400
commit 6e5494d028
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -74,7 +74,9 @@ export function useAuthProvider({
const userDetails = useQuery<UserDetails>(userDetailsQuery, {
client: apolloClient,
skip: !authenticated,
fetchPolicy: "network-only"
// Don't change this to 'network-only' - update of intl provider's
// state will cause an error
fetchPolicy: "cache-and-network"
});
const handleLogout = async () => {