Show CreateAnother only at end of list on own profile

CreateAnother replaces ListFooter only when:
- Viewing own profile (isMe)
- No more pages to load (!hasNextPage)
- Not currently fetching (!isFetchingNextPage)

Otherwise show ListFooter for pagination/loading state.
This commit is contained in:
Claude
2026-01-21 19:11:28 +00:00
committed by Samuel Newman
parent c7d51d6390
commit a82bbb6d25
@@ -164,17 +164,18 @@ export function ProfileStarterPacks({
if (!data || items?.length === 0) { if (!data || items?.length === 0) {
return null return null
} }
// Show CreateAnother only at the end of the list on own profile
if (isMe && !hasNextPage && !isFetchingNextPage) {
return <CreateAnother style={{paddingBottom: bottomBarOffset}} />
}
return ( return (
<>
<ListFooter <ListFooter
isFetchingNextPage={isFetchingNextPage} isFetchingNextPage={isFetchingNextPage}
hasNextPage={hasNextPage} hasNextPage={hasNextPage}
error={isError ? 'Could not load more starter packs' : undefined} error={isError ? 'Could not load more starter packs' : undefined}
onRetry={fetchNextPage} onRetry={fetchNextPage}
style={!isMe ? {paddingBottom: bottomBarOffset} : undefined} style={{paddingBottom: bottomBarOffset}}
/> />
{isMe && <CreateAnother style={{paddingBottom: bottomBarOffset}} />}
</>
) )
}, [ }, [
data, data,