Skip to content

Commit 2241e3c

Browse files
committed
Log pixel top and bottom
1 parent 03042da commit 2241e3c

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

web/pages/[username]/index.tsx

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ import {CompassLoadingIndicator} from "web/components/widgets/loading-indicator"
2020
import Custom404 from '../404'
2121
import {sleep} from "common/util/time";
2222
import {isNativeMobile} from "web/lib/util/webview";
23+
import {getPixelHeight} from "web/lib/util/css";
2324

2425
async function getUser(username: string) {
2526
const user = await getUserForStaticProps(db, username)
@@ -150,6 +151,11 @@ type ActiveUserPageProps = {
150151
export default function UserPage(props: UserPageProps) {
151152
// console.log('Starting UserPage in /[username]')
152153

154+
useEffect(() => {
155+
console.log('safe-area-inset-bottom:', getPixelHeight('safe-area-inset-bottom'))
156+
console.log('safe-area-inset-top:', getPixelHeight('safe-area-inset-top'))
157+
}, []);
158+
153159
const nativeMobile = isNativeMobile()
154160
const router = useRouter()
155161
const username = (nativeMobile ? router.query.username : props.username) as string

web/pages/_app.tsx

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ import AndroidPush from "web/lib/service/android-push";
1515
import {isAndroidWebView} from "web/lib/util/webview";
1616
import {Capacitor} from '@capacitor/core';
1717
import {StatusBar} from '@capacitor/status-bar';
18-
import {getPixelHeight} from "web/lib/util/css";
1918

2019
if (Capacitor.isNativePlatform()) {
2120
// Only runs on iOS/Android native
@@ -84,9 +83,6 @@ function MyApp({Component, pageProps}: AppProps<PageProps>) {
8483
const title = 'Compass'
8584
const description = 'The platform for intentional connections'
8685

87-
console.log('safe-area-inset-bottom:', getPixelHeight('safe-area-inset-bottom'))
88-
console.log('safe-area-inset-top:', getPixelHeight('safe-area-inset-top'))
89-
9086
return (
9187
<>
9288
<Head>

0 commit comments

Comments
 (0)