()
| 27 | }, [url]) |
| 28 | |
| 29 | const refreshIframe = () => { |
| 30 | if (iframeRef.current && currentUrl) { |
| 31 | setIsLoading(true) |
| 32 | setError(null) |
| 33 | loadStartTime.current = Date.now() |
| 34 | iframeRef.current.src = '' |
| 35 | setTimeout(() => { |
| 36 | if (iframeRef.current) { |
| 37 | iframeRef.current.src = currentUrl |
| 38 | } |
| 39 | }, 10) |
| 40 | } |
| 41 | } |
| 42 | |
| 43 | const loadNewUrl = () => { |
| 44 | if (iframeRef.current && inputValue) { |