Fix double border on web hashtag list (#3091)

* add `topBorder` to Views.tsx

* fix double border
This commit is contained in:
Hailey 2024-03-06 11:02:48 -08:00 committed by GitHub
parent 7a592d8140
commit b8f36a8bca
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 23 additions and 12 deletions

View file

@ -1,6 +1,7 @@
import React from 'react'
import {atoms as a, useBreakpoints, useTheme} from '#/alf'
import {View} from 'react-native'
import {CenteredView} from 'view/com/util/Views'
import {Loader} from '#/components/Loader'
import {Trans} from '@lingui/macro'
import {cleanError} from 'lib/strings/errors'
@ -143,7 +144,7 @@ export function ListMaybePlaceholder({
}) {
const navigation = useNavigation<NavigationProp>()
const t = useTheme()
const {gtMobile} = useBreakpoints()
const {gtMobile, gtTablet} = useBreakpoints()
const canGoBack = navigation.canGoBack()
const onGoBack = React.useCallback(() => {
@ -165,14 +166,16 @@ export function ListMaybePlaceholder({
if (!isEmpty) return null
return (
<View
<CenteredView
style={[
a.flex_1,
a.align_center,
!gtMobile ? [a.justify_between, a.border_t] : a.gap_5xl,
!gtMobile ? a.justify_between : a.gap_5xl,
t.atoms.border_contrast_low,
{paddingTop: 175, paddingBottom: 110},
]}>
]}
sideBorders={gtMobile}
topBorder={!gtTablet}>
{isLoading ? (
<View style={[a.w_full, a.align_center, {top: 100}]}>
<Loader size="xl" />
@ -241,6 +244,6 @@ export function ListMaybePlaceholder({
</View>
</>
)}
</View>
</CenteredView>
)
}