()
| 61 | |
| 62 | // Use a global cache on window to persist across remounts/tab switches |
| 63 | const getKeyFilesCache = (): { [key: string]: KeyFile[] } => { |
| 64 | if (typeof window !== 'undefined') { |
| 65 | |
| 66 | if (!(window as any).__keyFilesCache) { |
| 67 | (window as any).__keyFilesCache = {}; |
| 68 | } |
| 69 | |
| 70 | return (window as any).__keyFilesCache; |
| 71 | } |
| 72 | // SSR fallback (shouldn't happen for this component) |
| 73 | return {}; |
| 74 | }; |
| 75 | |
| 76 | useEffect(() => { |
| 77 | // Declare controller and timeoutId in the outer scope so they are accessible in cleanup |
no outgoing calls
no test coverage detected