@@ -8,20 +8,22 @@ type RelatedPostProps = {
8
8
} ;
9
9
function RelatedPost ( { type } : RelatedPostProps ) {
10
10
const [ visible , setVisible ] = useState ( true ) ;
11
- useEffect ( ( ) => {
12
- const width = window . innerWidth ;
13
- if ( type === 'desktop' && width < 768 ) {
14
- setVisible ( false ) ;
15
- return ;
16
- }
17
- if ( type === 'mobile' && width >= 768 ) {
18
- setVisible ( false ) ;
19
- return ;
20
- }
21
- setTimeout ( ( ) => {
22
- ( window . adsbygoogle = window . adsbygoogle || [ ] ) . push ( { } ) ;
23
- } , 100 ) ;
24
- } , [ type ] ) ;
11
+ // useEffect(() => {
12
+ // setTimeout(() => {
13
+ // const width = window.innerWidth;
14
+ // if (type === 'desktop' && width < 768) {
15
+ // setVisible(false);
16
+ // return;
17
+ // }
18
+ // if (type === 'mobile' && width >= 768) {
19
+ // setVisible(false);
20
+ // return;
21
+ // }
22
+ // setTimeout(() => {
23
+ // (window.adsbygoogle = window.adsbygoogle || []).push({});
24
+ // }, 100);
25
+ // }, 250);
26
+ // }, [type]);
25
27
26
28
useEffect ( ( ) => {
27
29
detectAnyAdblocker ( ) . then ( ( detected : boolean ) => {
@@ -35,36 +37,24 @@ function RelatedPost({ type }: RelatedPostProps) {
35
37
36
38
return (
37
39
< Wrapper >
38
- < h4 > 관심 있을 만한 포스트</ h4 >
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 = "6"
60
- data-matched-content-columns-num = "1"
61
- > </ ins >
62
- ) }
40
+ < h4 > 관심 있을 만한 포스트</ h4 > (
41
+ < ins
42
+ className = "adsbygoogle"
43
+ style = { { display : 'block' } }
44
+ data-ad-format = "autorelaxed"
45
+ data-ad-client = "ca-pub-5574866530496701"
46
+ data-ad-slot = "4990574169"
47
+ data-matched-content-ui-type = "image_stacked"
48
+ data-matched-content-rows-num = "2"
49
+ data-matched-content-columns-num = "3"
50
+ > </ ins >
63
51
</ Wrapper >
64
52
) ;
65
53
}
66
54
67
55
const Wrapper = styled ( VelogResponsive ) `
56
+ padding-left: 1rem;
57
+ padding-right: 1rem;
68
58
margin-top: 4rem;
69
59
margin-bottom: 3rem;
70
60
` ;
0 commit comments