Commit 90a76dd
authored
fix(invite): hold the loading state until the stored token resolves (#6488)
Two gaps left by #6486.
The query was gated on isTokenResolved but the loading state was not. With
enabled: false React Query still reports success when the key already holds
data, so a cached null-token entry made isPending false and rendered the accept
UI for one frame before the effect applied the stored token. Reachable only on a
client-side remount after a tokenless fetch already succeeded.
An empty ?token= also stopped falling back to storage: searchParams.get returns
'' which is not null, so token became '' where the pre-#6486 truthiness check
had read sessionStorage. Normalize to null at the source.1 parent 5bfcc67 commit 90a76dd
1 file changed
Lines changed: 3 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
286 | 286 | | |
287 | 287 | | |
288 | 288 | | |
289 | | - | |
| 289 | + | |
| 290 | + | |
290 | 291 | | |
291 | 292 | | |
292 | 293 | | |
| |||
308 | 309 | | |
309 | 310 | | |
310 | 311 | | |
311 | | - | |
| 312 | + | |
312 | 313 | | |
313 | 314 | | |
314 | 315 | | |
| |||
0 commit comments