1
1
import React from 'react'
2
- import { ListRenderItemInfo , Pressable , StyleSheet , View } from 'react-native'
2
+ import { ListRenderItemInfo , Pressable , View } from 'react-native'
3
3
import { PostView } from '@atproto/api/dist/client/types/app/bsky/feed/defs'
4
4
import { msg } from '@lingui/macro'
5
5
import { useLingui } from '@lingui/react'
6
6
import { useFocusEffect } from '@react-navigation/native'
7
7
import { NativeStackScreenProps } from '@react-navigation/native-stack'
8
8
9
- import { usePalette } from '#/lib/hooks/usePalette'
10
9
import { HITSLOP_10 } from 'lib/constants'
11
10
import { useInitialNumToRender } from 'lib/hooks/useInitialNumToRender'
12
11
import { CommonNavigatorParams } from 'lib/routes/types'
@@ -39,7 +38,6 @@ export default function HashtagScreen({
39
38
} : NativeStackScreenProps < CommonNavigatorParams , 'Hashtag' > ) {
40
39
const { tag, author} = route . params
41
40
const { _} = useLingui ( )
42
- const pal = usePalette ( 'default' )
43
41
44
42
const fullTag = React . useMemo ( ( ) => {
45
43
return `#${ decodeURIComponent ( tag ) } `
@@ -111,7 +109,7 @@ export default function HashtagScreen({
111
109
112
110
return (
113
111
< >
114
- < CenteredView sideBorders style = { [ pal . border , pal . view ] } >
112
+ < CenteredView sideBorders = { true } >
115
113
< ViewHeader
116
114
showOnDesktop
117
115
title = { headerTitle }
@@ -138,8 +136,17 @@ export default function HashtagScreen({
138
136
onPageSelected = { onPageSelected }
139
137
renderTabBar = { props => (
140
138
< 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
+ } >
143
150
< TabBar items = { sections . map ( section => section . title ) } { ...props } />
144
151
</ CenteredView >
145
152
) }
@@ -234,12 +241,3 @@ function HashtagScreenTab({
234
241
</ >
235
242
)
236
243
}
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