UNPKG

@dbs-portal/core-api

Version:

HTTP client and API utilities for DBS Portal

24 lines 816 B
import { jsx as _jsx } from "react/jsx-runtime"; /** * TanStack Query provider component */ import { QueryClientProvider } from '@tanstack/react-query'; import { createQueryClient } from './query-client'; import { setGlobalApiClient } from './hooks'; /** * Query provider component that sets up TanStack Query */ export function QueryProvider({ children, apiClient, queryClient }) { // Create query client if not provided const client = queryClient || createQueryClient(apiClient); // Set global API client for hooks if (apiClient) { setGlobalApiClient(apiClient); } return (_jsx(QueryClientProvider, { client: client, children: children })); } /** * Hook to access the query client */ export { useQueryClient } from '@tanstack/react-query'; //# sourceMappingURL=provider.js.map