category icons
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
import {ScrollView, View} from 'react-native'
|
import {View} from 'react-native'
|
||||||
import {i18n, type MessageDescriptor} from '@lingui/core'
|
import {i18n, type MessageDescriptor} from '@lingui/core'
|
||||||
import {msg} from '@lingui/core/macro'
|
import {msg} from '@lingui/core/macro'
|
||||||
import {useLingui} from '@lingui/react'
|
import {useLingui} from '@lingui/react'
|
||||||
@@ -51,11 +51,15 @@ export function GifCategoryPills({
|
|||||||
useLingui()
|
useLingui()
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<View style={[a.mb_sm]}>
|
<View
|
||||||
<ScrollView
|
style={[
|
||||||
horizontal
|
a.flex_row,
|
||||||
showsHorizontalScrollIndicator={false}
|
a.justify_between,
|
||||||
contentContainerStyle={[a.flex_row, a.gap_xs, a.px_xl]}>
|
a.align_center,
|
||||||
|
a.gap_xs,
|
||||||
|
a.px_xl,
|
||||||
|
a.mb_sm,
|
||||||
|
]}>
|
||||||
{GIF_CATEGORIES.map(category => {
|
{GIF_CATEGORIES.map(category => {
|
||||||
if (category.id === 'recents' && !hasRecents) return null
|
if (category.id === 'recents' && !hasRecents) return null
|
||||||
const isActive = category.id === activeId
|
const isActive = category.id === activeId
|
||||||
@@ -73,7 +77,6 @@ export function GifCategoryPills({
|
|||||||
</Button>
|
</Button>
|
||||||
)
|
)
|
||||||
})}
|
})}
|
||||||
</ScrollView>
|
|
||||||
</View>
|
</View>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user