[PWI] Home (#2007)
* Fix up home page * Fix spacing * Remove unused default tab * Update logic
This commit is contained in:
parent
a741a201b9
commit
d4714baf13
4 changed files with 121 additions and 61 deletions
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue