Improve ad rendering by removing unnecessary logs and styling

Remove console logs and default styling from the AdSenseAd component, allowing for dynamic styling via props and improving ad rendering consistency.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: 45a1dcfc-f8a2-475a-a6b9-96fbb841dc27
Replit-Commit-Checkpoint-Type: full_checkpoint
Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/60d372ff-2c10-46c7-b01b-10c3435136b0/45a1dcfc-f8a2-475a-a6b9-96fbb841dc27/qiRTV0F
This commit is contained in:
sebastjanartic 2025-09-17 09:42:43 +00:00
parent 646f4f3843
commit 2579fd8236
2 changed files with 1 additions and 6 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 314 KiB

View File

@ -21,10 +21,8 @@ export default function AdSenseAd({
try {
// Ensure adsbygoogle is loaded
if (typeof window !== 'undefined') {
console.log(`🎯 AdSense: Initializing ad slot ${adSlot}`);
// @ts-ignore
(window.adsbygoogle = window.adsbygoogle || []).push({});
console.log(`✅ AdSense: Ad slot ${adSlot} pushed to queue`);
}
} catch (error) {
console.error('AdSense initialization error:', error);
@ -45,11 +43,8 @@ export default function AdSenseAd({
adStyle.height = 'auto';
}
console.log(`📐 AdSense: Rendering ad slot ${adSlot} with style:`, adStyle);
return (
<div className={`adsense-wrapper ${className}`} ref={adRef} style={{ minHeight: '250px', background: 'rgba(255,255,255,0.05)', border: '1px solid rgba(255,255,255,0.1)', borderRadius: '8px', padding: '10px' }}>
<div className="text-white text-xs opacity-50 mb-2">AdSense Slot: {adSlot}</div>
<div className={`adsense-wrapper ${className}`} ref={adRef}>
<ins
className="adsbygoogle"
style={adStyle}