Skip to content

Commit

Permalink
fix: readd noopstorage
Browse files Browse the repository at this point in the history
  • Loading branch information
simodrws committed Jan 31, 2024
1 parent b95dca2 commit d7873a7
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/masa-client/query-client.ts
Expand Up @@ -2,6 +2,7 @@ import { createSyncStoragePersister } from '@tanstack/query-sync-storage-persist
import { Query, QueryClient, QueryKey } from '@tanstack/react-query';
import type { Persister } from '@tanstack/react-query-persist-client';
import { persistQueryClient } from '@tanstack/react-query-persist-client';
import { noopStorage } from '@wagmi/core';

// import { createSyncStoragePersister } from '@tanstack/query-sync-storage-persister'
// import { QueryClient } from '@tanstack/react-query'
Expand All @@ -26,7 +27,11 @@ export const createQueryClientAndPersister = () => {
},
});

const storage = window.localStorage;
const storage =
typeof window !== 'undefined' && window.localStorage
? window.localStorage
: noopStorage;

// createStorage({
// storage:
// typeof window !== 'undefined' && window.localStorage
Expand Down

0 comments on commit d7873a7

Please sign in to comment.