광고추가
This commit is contained in:
31
App.tsx
31
App.tsx
@@ -76,6 +76,26 @@ const MapResizer = () => {
|
||||
return null;
|
||||
};
|
||||
|
||||
const AdSenseComponent = () => {
|
||||
useEffect(() => {
|
||||
try {
|
||||
// @ts-ignore
|
||||
(window.adsbygoogle = window.adsbygoogle || []).push({});
|
||||
} catch (e) {
|
||||
console.error('AdSense error:', e);
|
||||
}
|
||||
}, []);
|
||||
|
||||
return (
|
||||
<ins className="adsbygoogle"
|
||||
style={{ display: 'block', width: '100%', height: '100%' }}
|
||||
data-ad-client="ca-pub-4444852135420953"
|
||||
data-ad-slot="7799405796"
|
||||
data-ad-format="auto"
|
||||
data-full-width-responsive="true"></ins>
|
||||
);
|
||||
};
|
||||
|
||||
const ChangeView = ({ center, zoom }: { center: [number, number], zoom?: number }) => {
|
||||
const map = useMap();
|
||||
useEffect(() => {
|
||||
@@ -380,6 +400,17 @@ const App: React.FC = () => {
|
||||
}} className="p-2 bg-gray-900 text-white rounded-xl active:scale-90 shadow-lg"><Target size={14} /></button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{/* Sponsor/AdSense Space */}
|
||||
<div className="hidden md:flex flex-col flex-1 bg-white/80 backdrop-blur-xl rounded-[32px] shadow-xl p-4 pointer-events-auto border border-white/50 min-h-[300px] max-h-[600px] overflow-hidden">
|
||||
<div className="flex items-center gap-2 mb-4">
|
||||
<div className="w-1.5 h-1.5 bg-amber-400 rounded-full"></div>
|
||||
<span className="text-[10px] font-black text-gray-400 uppercase tracking-[0.2em]">Sponsor</span>
|
||||
</div>
|
||||
<div className="flex-1 w-full bg-slate-50/50 rounded-2xl border border-slate-100 flex flex-col items-center justify-center overflow-hidden">
|
||||
<AdSenseComponent />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div className="flex-1 relative">
|
||||
|
||||
Reference in New Issue
Block a user