Skip to content

LFG · Search params & storage

0 modules · 0 exports · 1 repository · 4 e2e tests · 2 routes

The state LFG 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 lfgSearchParams

app/features/lfg/lfg-search-params.ts:21

ParamValueDefaultLoaderDescription
pagepage 1true

Resets post

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

Post to jump to: the loader serves the page containing it, overriding page.

weapons
v.pipe(
	v.array(numericEnum(mainWeaponIds)),
	v.maxLength(LFG.MAX_WEAPON_FILTERS),
)
[]true

Resets page post

type v.nullable(v.picklist(LFG_TYPES))nulltrue

Resets page post

timezone v.nullable(v.pipe(v.number(), v.integer(), v.minValue(0), v.maxValue(12)))nulltrue

Resets page post

language v.nullable(v.picklist(LANGUAGE_CODES))nulltrue

Resets page post

plusTier v.nullable(v.pipe(v.number(), v.integer(), v.minValue(1), v.maxValue(3)))nulltrue

Resets page post

minTier v.nullable(v.picklist(TIER_NAMES))nulltrue

Resets page post

maxTier v.nullable(v.picklist(TIER_NAMES))nulltrue

Resets page post

Used in LFGPostGraphic.tsxlfg.server.tslfg.tsxUserCard.tsxWidget.tsx

URL lfgNewSearchParams

app/features/lfg/lfg-search-params.ts:48

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

Used in lfg-urls.tslfg.new.server.ts