Commit 7c82d40
fix: add staleTime to prevent excessive refetching
useInitializeLearnerHome() is consumed by 15+ components, and with
staleTime defaulting to 0, every mount and window focus triggered a
redundant background refetch. Set staleTime to 5 minutes since
dashboard data rarely changes while the user is viewing it.
Co-Authored-By: Claude <noreply@anthropic.com>1 parent df5a00e commit 7c82d40
1 file changed
Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
| 18 | + | |
18 | 19 | | |
19 | 20 | | |
20 | 21 | | |
| |||
0 commit comments