Commit a3d9fbf
authored
Fix Your Nodes not refreshing after add/remove (#11)
The Add Nodes and batch-unlink success handlers invalidated the
/api/all-nodes cache but then called renderYourNodes(), which only
re-renders the stale in-memory snapshot (S._yourNodes) without issuing a
new fetch. Result: a just-added node didn't appear on Your Nodes (and a
just-removed node lingered) until the user navigated away and back or the
60s SWR cache lapsed.
Call loadYourNodes() instead so the page refetches the cache-invalidated
/api/all-nodes?...inPlanOnly list and reconciles with chain truth
immediately. Mirrors how the Add Nodes page already calls loadMgrNodes().
Backend was always correct (getNodesForPlan is a live RPC query); this is
purely a client refresh fix.
Co-authored-by: Sentinel-Bluebuilder <Sentinel-Bluebuilder@users.noreply.github.com>1 parent 7056073 commit a3d9fbf
1 file changed
Lines changed: 8 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10235 | 10235 | | |
10236 | 10236 | | |
10237 | 10237 | | |
10238 | | - | |
| 10238 | + | |
| 10239 | + | |
| 10240 | + | |
| 10241 | + | |
10239 | 10242 | | |
10240 | 10243 | | |
10241 | 10244 | | |
| |||
10286 | 10289 | | |
10287 | 10290 | | |
10288 | 10291 | | |
10289 | | - | |
| 10292 | + | |
| 10293 | + | |
| 10294 | + | |
| 10295 | + | |
10290 | 10296 | | |
10291 | 10297 | | |
10292 | 10298 | | |
| |||
0 commit comments