fix(compare): shared ?urns= links win over the visitor's stored selection (P1.3)

The seed effect only adopted the URL's schools when localStorage was
empty, so a recipient who had ever used compare silently saw their own
old shortlist instead of the shared one. Explicit URL urns now replace
the stored selection on load (then persist as usual); bare /compare
still restores the visitor's own selection. Adds replaceSchools() to
the comparison context. Card values also switch to CHART_TEXT_COLORS.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
Tudor
2026-07-02 21:34:07 +01:00
co-authored by Claude Fable 5
parent a1fa4fe874
commit 0294038fd3
4 changed files with 28 additions and 11 deletions
+2
View File
@@ -15,6 +15,7 @@ export function useComparison() {
selectedSchools,
addSchool,
removeSchool,
replaceSchools,
clearAll,
isSelected,
canAddMore,
@@ -39,6 +40,7 @@ export function useComparison() {
error,
addSchool,
removeSchool,
replaceSchools,
clearAll,
isSelected,
canAddMore,