summaryrefslogblamecommitdiffstatshomepage
path: root/frontend/src/routes/circles/+page.ts
blob: ea5c3df5df6d6b95d55d698b28142105eaaf4d5c (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12











                                                                                  
import { CircleSort, type CircleFilterInput } from '$gql/graphql';
import { parseFilter, parsePaginationData, parseSortData } from '$lib/Navigation';

export const trailingSlash = 'always';

export function load({ url }: { url: URL; params: Record<string, string> }) {
	return {
		sort: parseSortData(url.searchParams, CircleSort.Name),
		filter: parseFilter<CircleFilterInput>(url.searchParams),
		pagination: parsePaginationData(url.searchParams)
	};
}