diff --git a/src-web/components/App.tsx b/src-web/components/App.tsx index b7acdb52..200b2297 100644 --- a/src-web/components/App.tsx +++ b/src-web/components/App.tsx @@ -1,7 +1,4 @@ -import { createSyncStoragePersister } from '@tanstack/query-sync-storage-persister'; import { QueryClient, QueryClientProvider } from '@tanstack/react-query'; -import { ReactQueryDevtools } from '@tanstack/react-query-devtools'; -import { persistQueryClient } from '@tanstack/react-query-persist-client'; import { MotionConfig } from 'framer-motion'; import { Suspense } from 'react'; import { DndProvider } from 'react-dnd'; @@ -16,26 +13,12 @@ const queryClient = new QueryClient({ defaultOptions: { queries: { retry: false, - cacheTime: 1000 * 60 * 60 * 24, // 24 hours + refetchOnWindowFocus: true, networkMode: 'offlineFirst', - - // It's a desktop app, so this isn't necessary - refetchOnWindowFocus: false, }, }, }); -const localStoragePersister = createSyncStoragePersister({ - storage: window.localStorage, - throttleTime: 1000, // 1 second -}); - -persistQueryClient({ - queryClient, - persister: localStoragePersister, - maxAge: 1000 * 60 * 60 * 24, // 24 hours -}); - export function App() { return ( @@ -46,7 +29,7 @@ export function App() { - + {/**/} diff --git a/src-web/components/core/Button.tsx b/src-web/components/core/Button.tsx index 1803e23a..20a2e973 100644 --- a/src-web/components/core/Button.tsx +++ b/src-web/components/core/Button.tsx @@ -46,7 +46,6 @@ const _Button = forwardRef(function Button( () => classnames( className, - 'opacity-90 hover:opacity-100', 'outline-none whitespace-nowrap', 'focus-visible-or-class:ring', 'rounded-md flex items-center', diff --git a/src-web/components/core/StatusTag.tsx b/src-web/components/core/StatusTag.tsx index 301edf23..2e73647a 100644 --- a/src-web/components/core/StatusTag.tsx +++ b/src-web/components/core/StatusTag.tsx @@ -15,7 +15,7 @@ export function StatusTag({ asBackground, response, className }: Props) { = 0 && status < 100 && 'bg-red-600', status >= 100 && status < 200 && 'bg-yellow-600', status >= 200 && status < 300 && 'bg-green-600', diff --git a/src-web/hooks/useTheme.ts b/src-web/hooks/useTheme.ts index f1f4c6d3..d049caf7 100644 --- a/src-web/hooks/useTheme.ts +++ b/src-web/hooks/useTheme.ts @@ -1,9 +1,7 @@ import { useEffect } from 'react'; -import { getKeyValue } from '../lib/keyValueStore'; import type { Appearance } from '../lib/theme/window'; import { getAppearance, - getPreferredAppearance, setAppearance, subscribeToPreferredAppearanceChange, } from '../lib/theme/window'; @@ -26,14 +24,7 @@ export function useTheme() { useEffect(() => setAppearance(appearanceKv.value), [appearanceKv.value]); return { - appearance: appearanceKv.value ?? getAppearance(), + appearance: appearanceKv.value, toggleAppearance: handleToggleAppearance, }; } - -export async function getAppearanceKv() { - return getKeyValue({ - key: 'appearance', - fallback: getPreferredAppearance(), - }); -}