Stop doing the weird login bouncy bug

The item page got in a weird situation where this setting seemed to cause loading things _about_ `currentUser` to make the `useCurrentUser` GQL query flake out and say it's loading. This would make the layout bounce around a bunch while it tries to decide whether to show you the buttons or not.

I still don't love the UX of not having any loading state after login, but like… eh it's certainly better lmao
This commit is contained in:
Emi Matchu 2022-09-15 04:59:32 -07:00
parent 193e993095
commit 4c343aee3e

View file

@ -96,12 +96,6 @@ function useCurrentUserViaDb({ isEnabled }) {
// something is wrong and they need to reach out. // something is wrong and they need to reach out.
console.error("[useCurrentUser] Couldn't get current user:", error); console.error("[useCurrentUser] Couldn't get current user:", error);
}, },
// We set this option so that, when we enter the loading state after
// logging in and evicting `currentUser` from the cache, we'll see the
// `loading: true` state. Otherwise, Apollo just leaves the return value
// as-is until the new data comes in, so the user sees the logged-out
// state until the behind-the-scenes update to this query finishes.
notifyOnNetworkStatusChange: true,
} }
); );