aboutsummaryrefslogtreecommitdiff
path: root/apps/web/src/lib/searchParams.ts
blob: aae3f4c7962c691ccc3d8e561901916dbc60edb6 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
import {
  createSearchParamsCache,
  parseAsInteger,
  parseAsString,
} from "nuqs/server";
// Note: import from 'nuqs/server' to avoid the "use client" directive

export const searchParamsCache = createSearchParamsCache({
  // List your search param keys and associated parsers here:
  q: parseAsString.withDefault(""),
  maxResults: parseAsInteger.withDefault(10),
});