feat: add props type
This commit is contained in:
@@ -1,15 +1,20 @@
|
|||||||
|
<!--
|
||||||
|
Component: QueryProvider
|
||||||
|
Provides a QueryClientProvider for child components.
|
||||||
|
|
||||||
|
All components that use useQueryClient() or createQuery() must be
|
||||||
|
descendants of this provider.
|
||||||
|
-->
|
||||||
<script lang="ts">
|
<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 { queryClient } from '$shared/api/queryClient';
|
||||||
import { QueryClientProvider } from '@tanstack/svelte-query';
|
import { QueryClientProvider } from '@tanstack/svelte-query';
|
||||||
|
import type { Snippet } from 'svelte';
|
||||||
|
|
||||||
/** Slot content for child components */
|
interface Props {
|
||||||
let { children } = $props();
|
children?: Snippet;
|
||||||
|
}
|
||||||
|
|
||||||
|
let { children }: Props = $props();
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<QueryClientProvider client={queryClient}>
|
<QueryClientProvider client={queryClient}>
|
||||||
|
|||||||
Reference in New Issue
Block a user