Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions apps/web/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -565,6 +565,7 @@ export function App() {
queryKey: keys.projects,
queryFn: readProjects,
refetchInterval: FOLD_POLL_MS,
enabled: auth === "signed-in",
});
const projects = projectsRead.data?.projects ?? NO_PROJECTS;
const providers = providersRead.data?.providers ?? NO_PROVIDERS;
Expand Down Expand Up @@ -595,6 +596,13 @@ export function App() {
useEffect(() => {
if (signedOutByHost) setAuth("signed-out");
}, [signedOutByHost]);
// Query keys are not scoped to a person, so the cache belongs to whoever was
// signed in. Clearing it also saves the empty cache over the stored one.
useEffect(() => {
if (auth !== "signed-out") return;
queryClient.clear();
setSelected(null);
Comment thread
TheGreatAxios marked this conversation as resolved.
Resolved
}, [auth]);
const [setupLater, setSetupLater] = useState(modelSetupDeferred);
const [user, setUser] = useState<HubUser | null>(null);
useEffect(() => {
Expand Down