(min, max)
| 1 | import React from "react"; |
| 2 | // Utility helper for random number generation |
| 3 | const random = (min, max) => Math.floor(Math.random() * (max - min)) + min; |
| 4 | const useRandomInterval = (callback, minDelay, maxDelay) => { |
| 5 | const timeoutId = React.useRef(null); |
| 6 | const savedCallback = React.useRef(callback); |