Skip to content

Commit 5ad32b9

Browse files
committed
Change related post article style
1 parent 201a237 commit 5ad32b9

File tree

1 file changed

+27
-8
lines changed

1 file changed

+27
-8
lines changed

src/containers/post/RelatedPost.tsx

Lines changed: 27 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,9 @@ function RelatedPost({ type }: RelatedPostProps) {
1818
setVisible(false);
1919
return;
2020
}
21-
(window.adsbygoogle = window.adsbygoogle || []).push({});
21+
setTimeout(() => {
22+
(window.adsbygoogle = window.adsbygoogle || []).push({});
23+
}, 100);
2224
}, [type]);
2325

2426
useEffect(() => {
@@ -34,13 +36,30 @@ function RelatedPost({ type }: RelatedPostProps) {
3436
return (
3537
<Wrapper>
3638
<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+
)}
4463
</Wrapper>
4564
);
4665
}

0 commit comments

Comments
 (0)