Skip to content

Commit

Permalink
fix: unexpected caching inside react-query (#969)
Browse files Browse the repository at this point in the history
* fix: unexpected caching inside react-query

* fix: missing dsn-parser dependencies
  • Loading branch information
boris-w authored Oct 9, 2024
1 parent dd07079 commit 1fc4fac
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
5 changes: 2 additions & 3 deletions packages/sdk/src/context/app/AppProvider.tsx
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
import { Hydrate, QueryClientProvider } from '@tanstack/react-query';
import { ThemeProvider } from '@teable/next-themes';
import { isObject, merge } from 'lodash';
import { useMemo } from 'react';
import { useMemo, useState } from 'react';
import { AppContext } from '../app/AppContext';
import { ConnectionProvider } from './ConnectionProvider';
import type { ILocalePartial } from './i18n';
import { defaultLocale } from './i18n';
import { createQueryClient } from './queryClient';
const queryClient = createQueryClient();

interface IAppProviderProps {
forcedTheme?: string;
Expand All @@ -20,7 +19,7 @@ interface IAppProviderProps {

export const AppProvider = (props: IAppProviderProps) => {
const { forcedTheme, children, wsPath, lang, locale, dehydratedState } = props;

const [queryClient] = useState(() => createQueryClient());
const value = useMemo(() => {
return {
lang,
Expand Down
2 changes: 1 addition & 1 deletion renovate.json5
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@
"groupName": "cache-interop monorepo",
"groupSlug": "cache-interop",
"matchPackageNames": [
"@soluble/dsn-parser",
"@httpx/dsn-parser",
"@soluble/cache-ioredis",
"@soluble/cache-redis",
"@soluble/cache-interop"
Expand Down
2 changes: 1 addition & 1 deletion scripts/db-migrate.mjs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/usr/bin/env zx
import { parseDsn as parse } from '@soluble/dsn-parser';
import { parseDsn as parse } from '@httpx/dsn-parser';

const env = $.env;
let isCi = ['true', '1'].includes(env?.CI ?? '');
Expand Down

0 comments on commit 1fc4fac

Please sign in to comment.