Empty results state for sugg users

This commit is contained in:
Eric Bailey
2025-04-07 10:44:11 -05:00
parent b25aa7eda8
commit 57ee0f61c2
+22 -4
View File
@@ -41,6 +41,7 @@ import {ExploreRecommendations} from '#/screens/Search/modules/ExploreRecommenda
import {ExploreTrendingTopics} from '#/screens/Search/modules/ExploreTrendingTopics'
import {ExploreTrendingVideos} from '#/screens/Search/modules/ExploreTrendingVideos'
import {atoms as a, native, platform, useTheme, web} from '#/alf'
import {Admonition} from '#/components/Admonition'
import {Button} from '#/components/Button'
import * as FeedCard from '#/components/FeedCard'
import {ChevronBottom_Stroke2_Corner0_Rounded as ChevronDownIcon} from '#/components/icons/Chevron'
@@ -141,6 +142,10 @@ type ExploreScreenItems =
profile: AppBskyActorDefs.ProfileViewBasic
recId?: number
}
| {
type: 'profileEmpty'
key: 'profileEmpty'
}
| {
type: 'feed'
key: string
@@ -329,14 +334,18 @@ export function Explore({
}
if (profileItems.length === 0) {
// no items! remove the header
i.pop()
i.push({
type: 'profileEmpty',
key: 'profileEmpty',
})
} else {
i.push(...profileItems)
}
} else {
// no items! remove the header
i.pop()
i.push({
type: 'profileEmpty',
key: 'profileEmpty',
})
}
} else {
i.push({type: 'profilePlaceholder', key: 'profilePlaceholder'})
@@ -626,6 +635,15 @@ export function Explore({
/>
)
}
case 'profileEmpty': {
return (
<View style={[a.px_lg, a.pb_lg]}>
<Admonition>
<Trans>No results for "{selectedInterest}".</Trans>
</Admonition>
</View>
)
}
case 'feed': {
return (
<View