Repository navigation
Commit 4e32e9c
authored
fix: guard granularity URL sync until router is ready (#2293)
## Summary
Fixes `href interpolation failed` error when loading a dashboard page directly (e.g. `/dashboards/<id>` without query params).
The granularity sync effect was calling `setGranularity` before `router.isReady`, causing nuqs to build a URL with an unresolved `[dashboardId]` segment. Added a `router.isReady` guard to match the pattern used by the existing dashboard initialization effect.
Before:
<img width="1614" height="649" alt="Screenshot 2026-05-15 at 2 36 52 PM" src="https://github.com/user-attachments/assets/d36a5e12-4524-4f55-9567-0905c1ed3841" />
Afte
<img width="1797" height="691" alt="Screenshot 2026-05-15 at 2 38 19 PM" src="https://github.com/user-attachments/assets/db4285ae-7ec2-44a1-9c2f-ab0c6e99d2bd" />
r:1 parent 46c1459 commit 4e32e9c
2 files changed
Lines changed: 11 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1329 | 1329 | | |
1330 | 1330 | | |
1331 | 1331 | | |
1332 | | - | |
| 1332 | + | |
| 1333 | + | |
| 1334 | + | |
| 1335 | + | |
| 1336 | + | |
1333 | 1337 | | |
1334 | 1338 | | |
1335 | | - | |
| 1339 | + | |
1336 | 1340 | | |
1337 | 1341 | | |
1338 | 1342 | | |
| |||
0 commit comments