Boring changes
This commit is contained in:
parent
cfaf58dfba
commit
920119ff48
32 changed files with 912 additions and 88 deletions
|
|
@ -12,7 +12,7 @@ function currentUserId(): string | null {
|
|||
|
||||
/** Tracks which listings the signed-in user has opened.
|
||||
*
|
||||
* Reads the user from the shared PocketBase authStore so it stays self-contained — no need to
|
||||
* 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).
|
||||
|
|
@ -27,7 +27,7 @@ export function useClickedListings() {
|
|||
const userIdRef = useRef(userId);
|
||||
userIdRef.current = userId;
|
||||
// Mirrors the latest committed set so markClicked can decide (synchronously) whether a url is
|
||||
// new — without depending on the async state updater having run yet.
|
||||
// new, without depending on the async state updater having run yet.
|
||||
const clickedUrlsRef = useRef(clickedUrls);
|
||||
clickedUrlsRef.current = clickedUrls;
|
||||
|
||||
|
|
@ -73,7 +73,7 @@ export function useClickedListings() {
|
|||
pb.collection(CLICKED_LISTINGS_COLLECTION)
|
||||
.create({ user: uid, url })
|
||||
.catch(() => {
|
||||
// Ignore duplicate-index conflicts and transient failures — local state already
|
||||
// Ignore duplicate-index conflicts and transient failures; local state already
|
||||
// reflects the click, and a missed write only means it won't persist to the next visit.
|
||||
});
|
||||
}, []);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue