Press n or j to go to the next uncovered block, b, p or k for the previous block.
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | 1x 1x 1x 1x 1x 1x 1x 44x 44x 44x 44x 44x 44x 44x 44x 44x | /**
* /create/abacus URL assembly (Gitea #22). The studio's address carries two
* independent selections — WHOSE abacus (?player=) and WHICH saved design
* (?design=) — so changing one must never drop the other: picking a student
* inside a restored design keeps the design in the URL, and vice versa.
*/
export function studioHref(
pathname: string,
opts: { playerId: string | null; designId: string | null }
): string {
const qs = new URLSearchParams()
if (opts.designId) qs.set('design', opts.designId)
if (opts.playerId) qs.set('player', opts.playerId)
const search = qs.toString()
return search ? `${pathname}?${search}` : pathname
}
|