Download src/components/capacitor-init.tsx from NAP1320/RotNot: direct link, hf CLI and curl.
- Browser
- Download file 626 Bytes
-
https://huggingface.co/spaces/NAP1320/RotNot/resolve/main/src/components/capacitor-init.tsx
- Command line
-
hf download hf://spaces/NAP1320/RotNot/src/components/capacitor-init.tsx
-
curl -L -o capacitor-init.tsx https://huggingface.co/spaces/NAP1320/RotNot/resolve/main/src/components/capacitor-init.tsx
626 Bytes
| "use client"; | |
| /** | |
| * CapacitorInit — client-only component that runs Capacitor bootstrap on mount. | |
| * Rendered once in the root layout. No-ops cleanly in browser/PWA context. | |
| */ | |
| import { useEffect } from "react"; | |
| import { isNative, nativeStatusBar } from "@/lib/native"; | |
| export function CapacitorInit() { | |
| useEffect(() => { | |
| if (!isNative()) return; | |
| // Set status bar style to match RotNot's dark theme | |
| nativeStatusBar.setDark().catch(() => { | |
| // Ignore — native plugin may not be available on all platforms | |
| }); | |
| }, []); | |
| // Renders nothing — purely a side-effect component | |
| return null; | |
| } | |