Skip to content

Commit 86417bc

Browse files
committed
fix(ads): hide empty ad containers when adblock is active
1 parent 9e10906 commit 86417bc

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

app/ads/AdsInPost.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ export const AdsInPost = () => {
1515
}, [mounted])
1616

1717
return (
18-
<div className="max-w-prose px-6 lg:px-0">
18+
<div className="max-w-prose px-6 lg:px-0 empty:hidden has-[:empty]:hidden has-[[data-ad-status='unfilled']]:hidden">
1919
{mounted && (
2020
<ins
2121
className="adsbygoogle"

app/ads/AdsRecentPost.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ export const AdsRecentPost = () => {
1515
}, [mounted])
1616

1717
return (
18-
<div className="flex h-[140px] w-full items-center justify-center overflow-hidden border border-black bg-white dark:border-white dark:bg-gray-900 lg:h-[205px] lg:w-[520px]">
18+
<div className="flex h-[140px] w-full items-center justify-center overflow-hidden border border-black bg-white dark:border-white dark:bg-gray-900 lg:h-[205px] lg:w-[520px] has-[:empty]:hidden has-[[data-ad-status='unfilled']]:hidden">
1919
{mounted && (
2020
<ins
2121
className="adsbygoogle"

0 commit comments

Comments
 (0)