Add AdSense banner to disconnected state overlay
This commit is contained in:
24
App.tsx
24
App.tsx
@@ -8,6 +8,29 @@ import Settings from './components/Settings';
|
||||
import Terminal from './components/Terminal';
|
||||
import { LayoutDashboard, Settings as SettingsIcon, Usb, AlertCircle, RefreshCw, PanelRightClose, PanelRightOpen } from 'lucide-react';
|
||||
|
||||
const AdSenseBanner: React.FC = () => {
|
||||
useEffect(() => {
|
||||
try {
|
||||
// @ts-ignore
|
||||
(window.adsbygoogle = window.adsbygoogle || []).push({});
|
||||
} catch (e) {
|
||||
console.error("AdSense error", e);
|
||||
}
|
||||
}, []);
|
||||
|
||||
return (
|
||||
<div className="w-full max-w-lg mt-4">
|
||||
{/* AppLeftSizeBox */}
|
||||
<ins className="adsbygoogle"
|
||||
style={{ display: "block" }}
|
||||
data-ad-client="ca-pub-4444852135420953"
|
||||
data-ad-slot="7799405796"
|
||||
data-ad-format="auto"
|
||||
data-full-width-responsive="true"></ins>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
const App: React.FC = () => {
|
||||
const [connectionState, setConnectionState] = useState<ConnectionState>(ConnectionState.DISCONNECTED);
|
||||
const [basicInfo, setBasicInfo] = useState<BMSBasicInfo | null>(null);
|
||||
@@ -226,6 +249,7 @@ const App: React.FC = () => {
|
||||
<p className="text-gray-500 max-w-md mb-8">
|
||||
JBD BMS를 UART-to-USB 어댑터로 연결하여 실시간 상태를 확인하고 설정을 변경하세요.
|
||||
</p>
|
||||
<AdSenseBanner />
|
||||
</div>
|
||||
)}
|
||||
</main>
|
||||
|
||||
Reference in New Issue
Block a user