Fix some errors and make others visible

This commit is contained in:
Misode
2021-06-23 23:12:35 +02:00
parent 09c851914f
commit ac10c3f541
10 changed files with 108 additions and 87 deletions

View File

@@ -9,7 +9,9 @@ type AdProps = {
export function Ad({ type, id }: AdProps) {
useEffect(() => {
document.getElementById('ad-placeholder')?.remove()
ethicalads?.load()
if ('ethicalads' in window) {
ethicalads.load()
}
}, [])
return <div data-ea-publisher="misode-github-io" data-ea-type={type} class="ad dark flat" id={id}></div>