♻️(frontend) extract queryClient definition

It will be necessary to access the client in other components for manually
discarding or setting data in the central data store.
This commit is contained in:
lebaudantoine
2024-08-04 17:28:04 +02:00
committed by aleb_the_flash
parent 8115a39538
commit 55749a9565
2 changed files with 5 additions and 2 deletions

View File

@@ -2,7 +2,7 @@ import '@livekit/components-styles'
import '@/styles/index.css'
import { Suspense } from 'react'
import { ReactQueryDevtools } from '@tanstack/react-query-devtools'
import { QueryClient, QueryClientProvider } from '@tanstack/react-query'
import { QueryClientProvider } from '@tanstack/react-query'
import { useTranslation } from 'react-i18next'
import { useLang } from 'hoofd'
import { Switch, Route } from 'wouter'
@@ -11,8 +11,8 @@ import { NotFoundScreen } from './components/NotFoundScreen'
import { routes } from './routes'
import './i18n/init'
import { silenceLiveKitLogs } from "@/utils/livekit.ts";
import { queryClient } from "@/api/queryClient";
const queryClient = new QueryClient()
function App() {
const { i18n } = useTranslation()

View File

@@ -0,0 +1,3 @@
import { QueryClient } from "@tanstack/react-query";
export const queryClient = new QueryClient()