feat: add query provider for Tanstack

This commit is contained in:
Ilia Mashkov
2026-01-13 19:49:51 +03:00
parent 6e8376b8fc
commit 0f1eb489ed
2 changed files with 43 additions and 0 deletions

View File

@@ -0,0 +1,17 @@
<script lang="ts">
/**
* Query Provider Component
*
* All components that use useQueryClient() or createQuery() must be
* descendants of this provider.
*/
import { queryClient } from '$shared/api/queryClient';
import { QueryClientProvider } from '@tanstack/svelte-query';
/** Slot content for child components */
let { children } = $props();
</script>
<QueryClientProvider client={queryClient}>
{@render children?.()}
</QueryClientProvider>