"use client"; import { useEffect } from "react"; interface SidebarAdProps { slotId?: string; format?: "vertical" | "rectangle"; className?: string; } export default function SidebarAd({ slotId, format = "vertical", className = "" }: SidebarAdProps) { useEffect(() => { try { if (typeof window !== "undefined") { // @ts-expect-error Google ads window object (window.adsbygoogle = window.adsbygoogle || []).push({}); } } catch { // Ignore if AdSense blocked by user or not configured } }, []); return ( ); }