This commit is contained in:
Dan Abramov
2024-01-19 01:38:08 +00:00
parent 502afc9724
commit 532c924544
3 changed files with 4 additions and 13 deletions
+2 -2
View File
@@ -1,6 +1,6 @@
import {Dimensions, StyleProp, StyleSheet, TextStyle} from 'react-native'
import {Theme, TypographyVariant} from './ThemeContext'
import {isMobileWeb} from 'platform/detection'
import {isWeb} from 'platform/detection'
// 1 is lightest, 2 is light, 3 is mid, 4 is dark, 5 is darkest
export const colors = {
@@ -175,7 +175,7 @@ export const s = StyleSheet.create({
// dimensions
w100pct: {width: '100%'},
h100pct: {height: '100%'},
hContentRegion: isMobileWeb ? {flex: 1} : {height: '100%'},
hContentRegion: isWeb ? {minHeight: '100%'} : {height: '100%'},
window: {
width: Dimensions.get('window').width,
height: Dimensions.get('window').height,
+1 -10
View File
@@ -210,18 +210,9 @@ function useHeaderOffset() {
const {isDesktop, isTablet} = useWebMediaQueries()
const {fontScale} = useWindowDimensions()
const {hasSession} = useSession()
if (isDesktop) {
if (isDesktop || isTablet) {
return 0
}
if (isTablet) {
if (hasSession) {
return 50
} else {
return 0
}
}
if (hasSession) {
const navBarPad = 16
const navBarText = 21 * fontScale
+1 -1
View File
@@ -135,7 +135,7 @@ function FeedsTabBarTablet(
const styles = StyleSheet.create({
tabBar: {
// @ts-ignore Web only
position: 'fixed',
position: 'sticky',
zIndex: 1,
// @ts-ignore Web only -prf
left: 'calc(50% - 300px)',