From 2241e3c7d330ab164a037c3a2cf2dfc8cbd7ff7e Mon Sep 17 00:00:00 2001 From: MartinBraquet Date: Sun, 2 Nov 2025 21:26:50 +0100 Subject: [PATCH] Log pixel top and bottom --- web/pages/[username]/index.tsx | 6 ++++++ web/pages/_app.tsx | 4 ---- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/web/pages/[username]/index.tsx b/web/pages/[username]/index.tsx index abefbf50..2ca0d9cc 100644 --- a/web/pages/[username]/index.tsx +++ b/web/pages/[username]/index.tsx @@ -20,6 +20,7 @@ import {CompassLoadingIndicator} from "web/components/widgets/loading-indicator" import Custom404 from '../404' import {sleep} from "common/util/time"; import {isNativeMobile} from "web/lib/util/webview"; +import {getPixelHeight} from "web/lib/util/css"; async function getUser(username: string) { const user = await getUserForStaticProps(db, username) @@ -150,6 +151,11 @@ type ActiveUserPageProps = { export default function UserPage(props: UserPageProps) { // console.log('Starting UserPage in /[username]') + useEffect(() => { + console.log('safe-area-inset-bottom:', getPixelHeight('safe-area-inset-bottom')) + console.log('safe-area-inset-top:', getPixelHeight('safe-area-inset-top')) + }, []); + const nativeMobile = isNativeMobile() const router = useRouter() const username = (nativeMobile ? router.query.username : props.username) as string diff --git a/web/pages/_app.tsx b/web/pages/_app.tsx index 21e75313..0979f65b 100644 --- a/web/pages/_app.tsx +++ b/web/pages/_app.tsx @@ -15,7 +15,6 @@ import AndroidPush from "web/lib/service/android-push"; import {isAndroidWebView} from "web/lib/util/webview"; import {Capacitor} from '@capacitor/core'; import {StatusBar} from '@capacitor/status-bar'; -import {getPixelHeight} from "web/lib/util/css"; if (Capacitor.isNativePlatform()) { // Only runs on iOS/Android native @@ -84,9 +83,6 @@ function MyApp({Component, pageProps}: AppProps) { const title = 'Compass' const description = 'The platform for intentional connections' - console.log('safe-area-inset-bottom:', getPixelHeight('safe-area-inset-bottom')) - console.log('safe-area-inset-top:', getPixelHeight('safe-area-inset-top')) - return ( <>