Skip to content

User card · Search params & storage

0 modules · 0 exports · 1 repository · 5 e2e tests · 3 routes

The state User card 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 userCardEditSearchParams

app/features/user-card/user-card-search-params.ts:5

ParamValueDefaultLoaderDescription
returnTo
v.nullable(
	v.pipe(
		v.string(),
		v.check((value) => value.startsWith("/") && !value.startsWith("//")),
	),
)
nulltrue

Used in user-card.edit.server.tsuser-card.edit.tsxuser-card-urls.ts

URL userCardFriendshipSearchParams

app/features/user-card/user-card-search-params.ts:17

ParamValueDefaultLoaderDescription
mutuals v.boolean()falsetrue

Used in UserCard.tsxuser-card.$id.friendship.ts