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">
|
||||
/**
|
||||
* 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';
|
||||
import type { Snippet } from 'svelte';
|
||||
|
||||
/** Slot content for child components */
|
||||
let { children } = $props();
|
||||
interface Props {
|
||||
children?: Snippet;
|
||||
}
|
||||
|
||||
let { children }: Props = $props();
|
||||
</script>
|
||||
|
||||
<QueryClientProvider client={queryClient}>
|
||||
|
||||
Reference in New Issue
Block a user