Skip to content

Commit

Permalink
remove persist client
Browse files Browse the repository at this point in the history
  • Loading branch information
dnbrwstr committed Dec 3, 2024
1 parent 8eff69e commit effbeac
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 65 deletions.
1 change: 0 additions & 1 deletion apps/tlon-web-new/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@
"@tamagui/vite-plugin": "~1.112.12",
"@tanstack/react-query": "^5.32.1",
"@tanstack/react-query-devtools": "^5.32.1",
"@tanstack/react-query-persist-client": "^5.32.1",
"@tiptap/core": "^2.6.6",
"@tiptap/extension-blockquote": "^2.6.6",
"@tiptap/extension-bold": "^2.6.6",
Expand Down
23 changes: 0 additions & 23 deletions apps/tlon-web-new/src/indexedDBPersistor.ts

This file was deleted.

16 changes: 3 additions & 13 deletions apps/tlon-web-new/src/main.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,13 @@
// This is a temporary fix until we can figure out why this is happening.
// This was most likely caused by a recent dependency change.
import regeneratorRuntime from '@babel/runtime/regenerator';
import { PersistQueryClientProvider } from '@tanstack/react-query-persist-client';
import { EditorView } from '@tiptap/pm/view';
import { setupDb } from '@tloncorp/app/lib/webDb';
import { queryClient } from '@tloncorp/shared/api';
import { QueryClientProvider, queryClient } from '@tloncorp/shared/api';
import { PostHogProvider } from 'posthog-js/react';
import React from 'react';
import { createRoot } from 'react-dom/client';

import _api from './api';
import App from './app';
import indexedDBPersistor from './indexedDBPersistor';
import { analyticsClient, captureError } from './logic/analytics';
import './styles/index.css';

Expand Down Expand Up @@ -54,17 +50,11 @@ setupDb().then(() => {
root.render(
// Strict mode disabled as it breaks react-navigation on web
// <React.StrictMode>
<PersistQueryClientProvider
client={queryClient}
persistOptions={{
persister: indexedDBPersistor(`${window.our}-tlon`),
buster: `${window.our}-tlon-buster-0`,
}}
>
<QueryClientProvider client={queryClient}>
<PostHogProvider client={analyticsClient}>
<App />
</PostHogProvider>
</PersistQueryClientProvider>
</QueryClientProvider>
// </React.StrictMode>
);
});
48 changes: 20 additions & 28 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit effbeac

Please sign in to comment.