MCPcopy Create free account
hub / github.com/vercel/examples / refreshIframe

Function refreshIframe

apps/vibe-coding-platform/components/preview/preview.tsx:29–41  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

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) {

Callers 1

loadNewUrlFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected