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) {
return null
}
// Show CreateAnother only at the end of the list on own profile
if (isMe && !hasNextPage && !isFetchingNextPage) {
return <CreateAnother style={{paddingBottom: bottomBarOffset}} />
}
return (
<>
<ListFooter
isFetchingNextPage={isFetchingNextPage}
hasNextPage={hasNextPage}
error={isError ? 'Could not load more starter packs' : undefined}
onRetry={fetchNextPage}
style={!isMe ? {paddingBottom: bottomBarOffset} : undefined}
/>
{isMe && <CreateAnother style={{paddingBottom: bottomBarOffset}} />}
</>
<ListFooter
isFetchingNextPage={isFetchingNextPage}
hasNextPage={hasNextPage}
error={isError ? 'Could not load more starter packs' : undefined}
onRetry={fetchNextPage}
style={{paddingBottom: bottomBarOffset}}
/>
)
}, [
data,