@@ -18,7 +18,9 @@ function RelatedPost({ type }: RelatedPostProps) {
18
18
setVisible ( false ) ;
19
19
return ;
20
20
}
21
- ( window . adsbygoogle = window . adsbygoogle || [ ] ) . push ( { } ) ;
21
+ setTimeout ( ( ) => {
22
+ ( window . adsbygoogle = window . adsbygoogle || [ ] ) . push ( { } ) ;
23
+ } , 100 ) ;
22
24
} , [ type ] ) ;
23
25
24
26
useEffect ( ( ) => {
@@ -34,13 +36,30 @@ function RelatedPost({ type }: RelatedPostProps) {
34
36
return (
35
37
< Wrapper >
36
38
< h4 > 관심 있을 만한 포스트</ h4 >
37
- < ins
38
- className = "adsbygoogle"
39
- style = { { display : 'block' } }
40
- data-ad-format = "autorelaxed"
41
- data-ad-client = "ca-pub-5574866530496701"
42
- data-ad-slot = "4990574169"
43
- > </ ins >
39
+ { type === 'desktop' && (
40
+ < ins
41
+ className = "adsbygoogle"
42
+ style = { { display : 'block' } }
43
+ data-ad-format = "autorelaxed"
44
+ data-ad-client = "ca-pub-5574866530496701"
45
+ data-ad-slot = "4990574169"
46
+ data-matched-content-ui-type = "image_stacked"
47
+ data-matched-content-rows-num = "2"
48
+ data-matched-content-columns-num = "3"
49
+ > </ ins >
50
+ ) }
51
+ { type === 'mobile' && (
52
+ < ins
53
+ className = "adsbygoogle"
54
+ style = { { display : 'block' } }
55
+ data-ad-format = "autorelaxed"
56
+ data-ad-client = "ca-pub-5574866530496701"
57
+ data-ad-slot = "4990574169"
58
+ data-matched-content-ui-type = "image_stacked"
59
+ data-matched-content-rows-num = "4"
60
+ data-matched-content-columns-num = "1"
61
+ > </ ins >
62
+ ) }
44
63
</ Wrapper >
45
64
) ;
46
65
}
0 commit comments