Always render ListFooter, show CreateAnother only at end with items
Remove null return - always render ListFooter for consistent padding. CreateAnother only shows when isMe, at end of list, and has items.
This commit is contained in:
@@ -161,11 +161,8 @@ export function ProfileStarterPacks({
|
|||||||
)
|
)
|
||||||
|
|
||||||
const renderFooter = useCallback(() => {
|
const renderFooter = useCallback(() => {
|
||||||
if (!data || items?.length === 0) {
|
|
||||||
return null
|
|
||||||
}
|
|
||||||
// Show CreateAnother only at the end of the list on own profile
|
// Show CreateAnother only at the end of the list on own profile
|
||||||
if (isMe && !hasNextPage && !isFetchingNextPage) {
|
if (isMe && !hasNextPage && !isFetchingNextPage && data && items?.length) {
|
||||||
return <CreateAnother style={{paddingBottom: bottomBarOffset}} />
|
return <CreateAnother style={{paddingBottom: bottomBarOffset}} />
|
||||||
}
|
}
|
||||||
return (
|
return (
|
||||||
|
|||||||
Reference in New Issue
Block a user