From d4714baf13561236a85d44fec144f7f27a149bfd Mon Sep 17 00:00:00 2001 From: Eric Bailey Date: Mon, 27 Nov 2023 19:17:09 -0600 Subject: [PWI] Home (#2007) * Fix up home page * Fix spacing * Remove unused default tab * Update logic --- src/view/com/feeds/FeedPage.tsx | 25 +++++++++++++++++++++---- 1 file changed, 21 insertions(+), 4 deletions(-) (limited to 'src/view/com/feeds/FeedPage.tsx') diff --git a/src/view/com/feeds/FeedPage.tsx b/src/view/com/feeds/FeedPage.tsx index 535306afb..885cd2a15 100644 --- a/src/view/com/feeds/FeedPage.tsx +++ b/src/view/com/feeds/FeedPage.tsx @@ -195,13 +195,30 @@ export function FeedPage({ function useHeaderOffset() { const {isDesktop, isTablet} = useWebMediaQueries() const {fontScale} = useWindowDimensions() + const {hasSession} = useSession() + if (isDesktop) { return 0 } if (isTablet) { - return 50 + if (hasSession) { + return 50 + } else { + return 0 + } + } + + if (hasSession) { + const navBarPad = 16 + const navBarText = 21 * fontScale + const tabBarPad = 20 + 3 // nav bar padding + border + const tabBarText = 16 * fontScale + const magic = 7 * fontScale + return navBarPad + navBarText + tabBarPad + tabBarText + magic + } else { + const navBarPad = 16 + const navBarText = 21 * fontScale + const magic = 4 * fontScale + return navBarPad + navBarText + magic } - // default text takes 44px, plus 34px of pad - // scale the 44px by the font scale - return 34 + 44 * fontScale } -- cgit 1.4.1