Skip to content

Commit ec1e357

Browse files
committed
style: wrap AdSense block with container to prevent 0-width error
1 parent a915fc9 commit ec1e357

File tree

1 file changed

+9
-7
lines changed

1 file changed

+9
-7
lines changed

pages/post/[id].tsx

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -170,13 +170,15 @@ export default function Post({ postData, relatedPosts }: InferGetStaticPropsType
170170
)}
171171
{/* ads */}
172172
<div className="mt-10 flex justify-center min-h-[100px]">
173-
<ins
174-
className="adsbygoogle"
175-
style={{display: "block"}}
176-
data-ad-client="ca-pub-5103032140213770"
177-
data-ad-slot="3384415421"
178-
data-ad-format="autorelaxed"
179-
></ins>
173+
<div style={{width: "100%", maxWidth: "728px", minHeight: "100px"}}>
174+
<ins
175+
className="adsbygoogle"
176+
style={{display: "block", width: "100%", minHeight: "100px"}}
177+
data-ad-client="ca-pub-5103032140213770"
178+
data-ad-slot="3384415421"
179+
data-ad-format="autorelaxed"
180+
></ins>
181+
</div>
180182
</div>
181183
</main>
182184

0 commit comments

Comments
 (0)