Skip to content

Open-source and local-first Slack and Notion alternative that puts you in control of your data

Fix tanstack query to perform queries and mutations while offline

Hakan Shehu4a4006b78ec3
diff --git a/apps/desktop/src/renderer/root.tsx b/apps/desktop/src/renderer/root.tsx
index 9e33769e..dc84ec48 100644
--- a/apps/desktop/src/renderer/root.tsx
+++ b/apps/desktop/src/renderer/root.tsx
@@ -56,7 +56,16 @@ const router = createHashRouter([
},
]);
-const queryClient = new QueryClient();
+const queryClient = new QueryClient({
+ defaultOptions: {
+ queries: {
+ networkMode: 'always',
+ },
+ mutations: {
+ networkMode: 'always',
+ },
+ },
+});
const Root = () => {
const eventBus = useEventBus();