Skip to content

Commit 497aacf

Browse files
authored
fix hashtag screen side borders (#4983)
1 parent 69e896c commit 497aacf

File tree

2 files changed

+14
-16
lines changed

2 files changed

+14
-16
lines changed

src/components/Lists.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ let ListMaybePlaceholder = ({
178178
return (
179179
<CenteredView
180180
style={[
181-
a.flex_1,
181+
a.h_full_vh,
182182
a.align_center,
183183
!gtMobile ? a.justify_between : a.gap_5xl,
184184
t.atoms.border_contrast_low,

src/screens/Hashtag.tsx

Lines changed: 13 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
11
import React from 'react'
2-
import {ListRenderItemInfo, Pressable, StyleSheet, View} from 'react-native'
2+
import {ListRenderItemInfo, Pressable, View} from 'react-native'
33
import {PostView} from '@atproto/api/dist/client/types/app/bsky/feed/defs'
44
import {msg} from '@lingui/macro'
55
import {useLingui} from '@lingui/react'
66
import {useFocusEffect} from '@react-navigation/native'
77
import {NativeStackScreenProps} from '@react-navigation/native-stack'
88

9-
import {usePalette} from '#/lib/hooks/usePalette'
109
import {HITSLOP_10} from 'lib/constants'
1110
import {useInitialNumToRender} from 'lib/hooks/useInitialNumToRender'
1211
import {CommonNavigatorParams} from 'lib/routes/types'
@@ -39,7 +38,6 @@ export default function HashtagScreen({
3938
}: NativeStackScreenProps<CommonNavigatorParams, 'Hashtag'>) {
4039
const {tag, author} = route.params
4140
const {_} = useLingui()
42-
const pal = usePalette('default')
4341

4442
const fullTag = React.useMemo(() => {
4543
return `#${decodeURIComponent(tag)}`
@@ -111,7 +109,7 @@ export default function HashtagScreen({
111109

112110
return (
113111
<>
114-
<CenteredView sideBorders style={[pal.border, pal.view]}>
112+
<CenteredView sideBorders={true}>
115113
<ViewHeader
116114
showOnDesktop
117115
title={headerTitle}
@@ -138,8 +136,17 @@ export default function HashtagScreen({
138136
onPageSelected={onPageSelected}
139137
renderTabBar={props => (
140138
<CenteredView
141-
sideBorders
142-
style={[pal.border, pal.view, styles.tabBarContainer]}>
139+
sideBorders={true}
140+
// @ts-ignore web only
141+
style={
142+
isWeb
143+
? {
144+
position: isWeb ? 'sticky' : '',
145+
top: 0,
146+
zIndex: 1,
147+
}
148+
: undefined
149+
}>
143150
<TabBar items={sections.map(section => section.title)} {...props} />
144151
</CenteredView>
145152
)}
@@ -234,12 +241,3 @@ function HashtagScreenTab({
234241
</>
235242
)
236243
}
237-
238-
const styles = StyleSheet.create({
239-
tabBarContainer: {
240-
// @ts-ignore web only
241-
position: isWeb ? 'sticky' : '',
242-
top: 0,
243-
zIndex: 1,
244-
},
245-
})

0 commit comments

Comments
 (0)