Cache user on auth provider re-render (#1793)
This commit is contained in:
parent
517d3f9400
commit
6e5494d028
1 changed files with 3 additions and 1 deletions
|
@ -74,7 +74,9 @@ export function useAuthProvider({
|
||||||
const userDetails = useQuery<UserDetails>(userDetailsQuery, {
|
const userDetails = useQuery<UserDetails>(userDetailsQuery, {
|
||||||
client: apolloClient,
|
client: apolloClient,
|
||||||
skip: !authenticated,
|
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 () => {
|
const handleLogout = async () => {
|
||||||
|
|
Loading…
Reference in a new issue