-
Notifications
You must be signed in to change notification settings - Fork 0
/
Ad.js
29 lines (26 loc) · 796 Bytes
/
Ad.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
import { useEffect } from "react"
import style from "./styles/ad.module.css"
export default function Ad() {
useEffect(() => {
var ads = document.getElementsByClassName("adsbygoogle").length;
console.log(ads)
for (var i = 0; i < ads; i++) {
try {
(adsbygoogle = window.adsbygoogle || []).push({});
} catch (e) { console.log(e) }
}
}, []);
return (
<div>
<ins
/* className={style.adBlock} */
className="adsbygoogle"
styles="display:block; text-align:center;"
data-ad-layout="in-article"
data-ad-format="fluid"
data-ad-client="ca-pub-6752061057745278"
data-ad-slot="6544449518"
/>
</div>
)
}