광고추가
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">
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Private Wifi List</title>
|
||||
<link rel="icon" type="image/png" href="/favicon.png">
|
||||
<script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-4444852135420953" crossorigin="anonymous"></script>
|
||||
<script src="https://cdn.tailwindcss.com"></script>
|
||||
<link rel="stylesheet" href="https://unpkg.com/leaflet@1.9.4/dist/leaflet.css" integrity="sha256-p4NxAoJBhIIN+hmNHrzRCf9tD/miZyoHS5obTRR9BMY=" crossorigin=""/>
|
||||
<link rel="stylesheet" href="/index.css">
|
||||
|
||||
Reference in New Issue
Block a user