diff options
author | Eric Bailey <git@esb.lol> | 2023-11-27 19:17:09 -0600 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-11-27 17:17:09 -0800 |
commit | d4714baf13561236a85d44fec144f7f27a149bfd (patch) | |
tree | eea0aaf64ecd087c1bd9717ab7be8f43560bab4d /src/view/com/feeds | |
parent | a741a201b990e35e96ea22bd8c503923db4683f9 (diff) | |
download | voidsky-d4714baf13561236a85d44fec144f7f27a149bfd.tar.zst |
[PWI] Home (#2007)
* Fix up home page * Fix spacing * Remove unused default tab * Update logic
Diffstat (limited to 'src/view/com/feeds')
-rw-r--r-- | src/view/com/feeds/FeedPage.tsx | 25 |
1 files changed, 21 insertions, 4 deletions
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 } |