Skip to content

Tournament · Search params & storage

3 modules · 24 exports · 4 repositories · 23 e2e tests · 12 routes

The state Tournament keeps in the URL and in the browser's storage. Every param has a default and never fails to decode, see Search params, and each definition should have an assertRoundTrips test. The definitions of the whole app are listed in the reference.

Search params

URL tournamentSearchSearchParams

app/features/tournament/tournament-search-params.ts:14

ParamValueDefaultLoaderDescription
q v.pipe(v.string(), v.maxLength(100))""true
limit v.pipe(v.number(), v.integer(), v.minValue(1), v.maxValue(25))25true
minStartTimecustom nullableCodec(isoDateCodec)nulltrue
maxStartTimecustom nullableCodec(isoDateCodec)nulltrue

Used in TournamentSearch.tsxto.search.ts

URL tournamentJoinSearchParams

app/features/tournament/tournament-search-params.ts:30

ParamValueDefaultLoaderDescription
code v.nullable(v.string())nulltrue

Used in to.$id.join.server.tsto.$id.join.server.tstournament-urls.ts

URL tournamentTeamsSearchParams

app/features/tournament/tournament-search-params.ts:34

ParamValueDefaultLoaderDescription
pagepage 1true

Used in to.$id.teams.server.tsto.$id.teams.tsx