Skip to content
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 19 additions & 15 deletions apps/expo/features/catalog/screens/CatalogItemsScreen.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -161,14 +161,16 @@ function CatalogItemsScreen() {
}}
/>

<CategoriesFilter
data={categories}
onFilter={setActiveFilter}
activeFilter={activeFilter}
error={categoriesError}
retry={refetchCategories}
className="px-4 py-2"
/>
{!isSearching && (
<CategoriesFilter
data={categories}
onFilter={setActiveFilter}
activeFilter={activeFilter}
error={categoriesError}
retry={refetchCategories}
className="px-4 py-2"
/>
)}
Comment thread
coderabbitai[bot] marked this conversation as resolved.

<FlatList
key={activeFilter}
Expand Down Expand Up @@ -197,14 +199,16 @@ function CatalogItemsScreen() {
</View>
}
ListHeaderComponent={
<View className="mb-4">
<View className="flex-row items-center justify-between">
<Text className="text-muted-foreground">{totalItemsText}</Text>
!isSearching ? (
<View className="mb-4">
<View className="flex-row items-center justify-between">
<Text className="text-muted-foreground">{totalItemsText}</Text>
</View>
{paginatedItems.length > 0 && (
<Text className="mt-1 text-xs text-muted-foreground">{showingText}</Text>
)}
</View>
{paginatedItems.length > 0 && (
<Text className="mt-1 text-xs text-muted-foreground">{showingText}</Text>
)}
</View>
) : null
}
ListEmptyComponent={
<View className="flex-1 items-center justify-center p-8">
Expand Down