Skip to content

Scrims · Search params & storage

2 modules · 22 exports · 4 repositories · 12 e2e tests · 3 routes

The state Scrims 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 scrimsSearchParams

app/features/scrims/scrims-search-params.ts:6

ParamValueDefaultLoaderDescription
weekdayTimescustom timeRangeCodecnulltrue
weekendTimescustom timeRangeCodecnulltrue
divscustom divsCodecnulltrue
useDefaults v.boolean()truetrue

False once the user has edited the filters, making the URL win over their saved defaults.

associationId v.nullable(v.pipe(v.number(), v.integer(), v.gtValue(0)))nulltrue

Only posts whose visibility ever mentioned this association, not part of the saved default filters.

pendingRequestPostId v.nullable(v.pipe(v.number(), v.integer(), v.gtValue(0)))nullfalse

Used in ScrimCard.tsxscrims.server.tsscrims.tsxscrims-urls.tssidebar.server.ts