Slice 'For You' results (#8152)

This commit is contained in:
Eric Bailey
2025-04-07 19:40:31 -05:00
committed by GitHub
parent 1e8a96e297
commit 28876a4b23
+6 -1
View File
@@ -215,7 +215,6 @@ export function Explore({
const gate = useGate() const gate = useGate()
const guide = useProgressGuide('follow-10') const guide = useProgressGuide('follow-10')
const [selectedInterest, setSelectedInterest] = useState<string | null>(null) const [selectedInterest, setSelectedInterest] = useState<string | null>(null)
// TODO always get at least 10 back TODO still
const { const {
data: suggestedUsers, data: suggestedUsers,
isLoading: suggestedUsersIsLoading, isLoading: suggestedUsersIsLoading,
@@ -372,9 +371,14 @@ export function Explore({
type: 'profileEmpty', type: 'profileEmpty',
key: 'profileEmpty', key: 'profileEmpty',
}) })
} else {
if (selectedInterest === null) {
// First "For You" tab, only show 5 to keep screen short
i.push(...profileItems.slice(0, 5))
} else { } else {
i.push(...profileItems) i.push(...profileItems)
} }
}
} else { } else {
i.push({ i.push({
type: 'profileEmpty', type: 'profileEmpty',
@@ -393,6 +397,7 @@ export function Explore({
suggestedUsersIsLoading, suggestedUsersIsLoading,
suggestedUsersIsRefetching, suggestedUsersIsRefetching,
suggestedUsersError, suggestedUsersError,
selectedInterest,
]) ])
const suggestedFeedsModule = useMemo(() => { const suggestedFeedsModule = useMemo(() => {
const i: ExploreScreenItems[] = [] const i: ExploreScreenItems[] = []