Logging out or switching accounts kept the previous user's React Query cache (follows, feed, cloud, e621 pages), so the new account briefly saw the old one's followed tags/pools until each query refetched. The query client now lives in lib/queryClient.ts and login/register/logout clear it alongside the e621 credential store.
19 lines
515 B
TypeScript
19 lines
515 B
TypeScript
import { QueryClientProvider } from "@tanstack/react-query";
|
|
import { StrictMode } from "react";
|
|
import { createRoot } from "react-dom/client";
|
|
import { BrowserRouter } from "react-router-dom";
|
|
|
|
import App from "./App";
|
|
import "./index.css";
|
|
import { queryClient } from "@/lib/queryClient";
|
|
|
|
createRoot(document.getElementById("root")!).render(
|
|
<StrictMode>
|
|
<QueryClientProvider client={queryClient}>
|
|
<BrowserRouter>
|
|
<App />
|
|
</BrowserRouter>
|
|
</QueryClientProvider>
|
|
</StrictMode>,
|
|
);
|