Skip to content

Commit b4c3109

Browse files
committed
fixad
1 parent 33e3593 commit b4c3109

File tree

1 file changed

+10
-8
lines changed

1 file changed

+10
-8
lines changed

src/components/GoogleScripts.tsx

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -106,16 +106,18 @@ function Gad({
106106
googletag.display?.(adId)
107107
googletag.pubads?.().refresh([adSlot.slot])
108108
}
109+
})
109110

110-
// Set individual refresh intervals for each ad
111-
const interval = setInterval(function () {
112-
cmd.push(function () {
113-
googletag.pubads?.().refresh([adSlot.slot])
114-
})
115-
}, adSlot.refreshInterval)
111+
// Set individual refresh intervals for each ad
112+
const interval = setInterval(function () {
113+
cmd.push(function () {
114+
googletag.pubads?.().refresh([adSlot.slot])
115+
})
116+
}, adSlot.refreshInterval)
116117

117-
return () => clearInterval(interval)
118-
})
118+
return () => {
119+
clearInterval(interval)
120+
}
119121
}, [])
120122

121123
return (

0 commit comments

Comments
 (0)