(event: StorageEvent)
| 45 | } |
| 46 | customNamesRef.current = loadCustomNames(); |
| 47 | const handleStorage = (event: StorageEvent) => { |
| 48 | if (event.key === STORAGE_KEY_CUSTOM_NAMES) { |
| 49 | customNamesRef.current = loadCustomNames(); |
| 50 | } |
| 51 | }; |
| 52 | window.addEventListener("storage", handleStorage); |
| 53 | return () => window.removeEventListener("storage", handleStorage); |
| 54 | }, []); |
nothing calls this directly
no test coverage detected