(_error: ErrorLogInterface)
| 33 | |
| 34 | const navigateRef = React.useRef(navigate); |
| 35 | navigateRef.current = navigate; |
| 36 | const pathRef = React.useRef(location.pathname); |
| 37 | pathRef.current = location.pathname; |
| 38 | // Dedupe identical errors within a short window so a failing page effect that |
| 39 | // refires can't spin the handler into an infinite loop. |
| 40 | const lastErrorRef = React.useRef<{ key: string; time: number }>({ key: "", time: 0 }); |
| 41 | const redirectingRef = React.useRef(false); |
| 42 | |
| 43 | // Re-arm the 401 redirect guard once the user lands back on the login screen. |
| 44 | React.useEffect(() => { |
| 45 | if (location.pathname.startsWith("/login")) redirectingRef.current = false; |
| 46 | }, [location.pathname]); |
nothing calls this directly
no outgoing calls
no test coverage detected