Open History to see the last commit
1import type { LayoutLoad } from './$types'
2import { contactsQueries } from '$lib/services/contacts/queries'
3β
4export const load: LayoutLoad = async ({ parent, fetch, url }) => {
5 const { queryClient } = await parent()
6 const q = url.searchParams.get('q') ?? ''
7 await queryClient.query({
8 ...contactsQueries.list(q, fetch),
9 staleTime: 'static',
10 })
11 return { q }
12}