Log pixel top and bottom

This commit is contained in:
MartinBraquet
2025-11-02 21:26:50 +01:00
parent 03042dae96
commit 2241e3c7d3
2 changed files with 6 additions and 4 deletions

View File

@@ -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

View File

@@ -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<PageProps>) {
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 (
<>
<Head>