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











                                                                                  
import { NamespaceSort, type NamespaceFilterInput } 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, NamespaceSort.Name),
		filter: parseFilter<NamespaceFilterInput>(url.searchParams),
		pagination: parsePaginationData(url.searchParams)
	};
}