diff --git a/.replit b/.replit index 6ce283d..4295f2a 100644 --- a/.replit +++ b/.replit @@ -15,6 +15,10 @@ run = ["npm", "run", "start"] localPort = 5000 externalPort = 80 +[[ports]] +localPort = 35163 +externalPort = 3000 + [env] PORT = "5000" diff --git a/client/src/components/adsense-ad.tsx b/client/src/components/adsense-ad.tsx index 961ba7e..50549f1 100644 --- a/client/src/components/adsense-ad.tsx +++ b/client/src/components/adsense-ad.tsx @@ -21,16 +21,20 @@ 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); } - }, []); + }, [adSlot]); const adStyle: React.CSSProperties = { - display: 'block' + display: 'block', + minWidth: '300px', + minHeight: '250px' }; if (adFormat !== 'auto' && width && height) { @@ -41,8 +45,11 @@ export default function AdSenseAd({ adStyle.height = 'auto'; } + console.log(`📐 AdSense: Rendering ad slot ${adSlot} with style:`, adStyle); + return ( -