Rename and purple instant

This commit is contained in:
Andras Schmelczer 2026-07-12 15:31:05 +01:00
parent f948efc06c
commit 6df2812a4e
8 changed files with 28 additions and 10 deletions

View file

@ -14,8 +14,10 @@ function currentUserId(): string | null {
*
* Reads the user from the shared PocketBase authStore so it stays self-contained, with no need to
* thread a user id down through the map layer tree. Returns a Set for O(1) membership checks in
* the map's colour accessor; a fresh Set instance is produced on every change so it can double
* as a deck.gl `updateTrigger` (identity-compared).
* the map's colour accessor; a fresh Set instance is produced on every change so React re-renders.
* Note: a Set can NOT be used directly as a deck.gl `updateTrigger` deck diffs triggers with
* `compareProps`, which finds no enumerable keys on a Set and reports "no change". Callers must
* pass `Array.from(clickedUrls)` (or a version counter) as the trigger instead.
*
* Writes are optimistic: `markClicked` updates local state synchronously so the pin recolours
* the instant it is clicked, independent of the PocketBase round-trip or the next listings fetch.