Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 11 additions & 11 deletions app/components/GoogleScripts.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,25 +12,25 @@
id: 'div-gpt-ad-1738811978953-leaderboard',
sizes: [[728, 90]],
targeting: 'leaderboard',
refreshInterval: 45_000, // 45 seconds
refreshInterval: 90_000, // 45 seconds
},
footer: {
id: 'div-gpt-ad-1738811978953-footer',
sizes: [[728, 90]],
targeting: 'footer',
refreshInterval: 45_000, // 45 seconds
refreshInterval: 90_000, // 45 seconds
},
rightRail: {
id: 'div-gpt-ad-1738811978953-right-rail',
sizes: [[300, 250]],
targeting: 'right-side-rail',
refreshInterval: 45_000, // 45 seconds
refreshInterval: 90_000, // 45 seconds
},
leftRail: {
id: 'div-gpt-ad-1738811978953-left-rail',
sizes: [[300, 250]],
targeting: 'left-side-rail',
refreshInterval: 45_000, // 45 seconds
refreshInterval: 90_000, // 45 seconds
},
} satisfies Record<
string,
Expand Down Expand Up @@ -74,17 +74,17 @@
window.googletag.enableServices()
window.googletag.display(adId)

// // Set individual refresh intervals for each ad
// const interval = setInterval(function () {
// window.googletag.cmd.push(function () {
// window.googletag.pubads().refresh([slot])
// })
// }, slot.refreshInterval)
// Set individual refresh intervals for each ad
const interval = setInterval(function () {
window.googletag.cmd.push(function () {
window.googletag.pubads().refresh([slot])
})
}, slot.refreshInterval)

// return () => clearInterval(interval)
return () => clearInterval(interval)
})
}
}, [])

Check warning on line 87 in app/components/GoogleScripts.tsx

View workflow job for this annotation

GitHub Actions / PR

React Hook React.useEffect has missing dependencies: 'adId', 'adSlot.id', 'adSlot.sizes', and 'adSlot.targeting'. Either include them or remove the dependency array

return (
<div {...props} className="grid [&>*]:col-start-1 [&>*]:row-start-1">
Expand Down
Loading