Keep AdSense rendering limited to anonymous visitors.

Show guest-only ad units on public pages and skip the AdSense script entirely for signed-in users.
This commit is contained in:
test
2026-09-20 14:49:34 +02:00
parent 37100ced3f
commit 17df4d0ad7
8 changed files with 135 additions and 8 deletions
+5
View File
@@ -9,6 +9,7 @@ import ArtworkTags from '../components/artwork/ArtworkTags'
import ArtworkDescription from '../components/artwork/ArtworkDescription'
import ArtworkEvolutionPanel from '../components/artwork/ArtworkEvolutionPanel'
import ArtworkComments from '../components/artwork/ArtworkComments'
import AdSenseUnit from '../components/ads/AdSenseUnit'
import ArtworkActionBar from '../components/artwork/ArtworkActionBar'
import ArtworkDetailsPanel from '../components/artwork/ArtworkDetailsPanel'
import CreatorSpotlight from '../components/artwork/CreatorSpotlight'
@@ -319,6 +320,10 @@ function publisherToGroupSummary(publisher) {
{/* Tags & categories */}
<ArtworkTags artwork={artwork} />
{!isAuthenticated ? (
<AdSenseUnit key={artwork.id} slot="4398418697" />
) : null}
{/* Comments */}
<ArtworkComments
artworkId={artwork.id}