mirror of
https://github.com/MODSetter/SurfSense.git
synced 2026-04-25 16:56:22 +02:00
Components were calling useSearchParams() at the top level but only reading the value inside useEffect or callbacks, never in JSX. This subscribed the entire component tree to every URL query change. Fix: read from window.location.search directly inside the effect so no React subscription is created. Changes: - new-chat/page.tsx: read commentId inside effect + popstate listener for SPA back/forward support; removes subscription from 1500+ line tree - dashboard/page.tsx: read window.location.search at redirect time; removes searchParams from dep array - public-chat-footer.tsx: one-shot mount read for action=clone param - TokenHandler.tsx: one-shot mount read for token + refresh_token params Implements Vercel React Best Practices Rule: rerender-defer-reads (5.2) |
||
|---|---|---|
| .. | ||
| public-chat-footer.tsx | ||
| public-chat-not-found.tsx | ||
| public-chat-view.tsx | ||
| public-thread.tsx | ||