Render both ListFooter and CreateAnother when isMe
Always render ListFooter for pagination behavior (loading indicator, error state). When viewing own profile, also render CreateAnother button after the ListFooter.
This commit is contained in:
@@ -164,17 +164,17 @@ export function ProfileStarterPacks({
|
||||
if (!data || items?.length === 0) {
|
||||
return null
|
||||
}
|
||||
if (isMe) {
|
||||
return <CreateAnother style={{paddingBottom: bottomBarOffset}} />
|
||||
}
|
||||
return (
|
||||
<ListFooter
|
||||
isFetchingNextPage={isFetchingNextPage}
|
||||
hasNextPage={hasNextPage}
|
||||
error={isError ? 'Could not load more starter packs' : undefined}
|
||||
onRetry={fetchNextPage}
|
||||
style={{paddingBottom: bottomBarOffset}}
|
||||
/>
|
||||
<>
|
||||
<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}} />}
|
||||
</>
|
||||
)
|
||||
}, [
|
||||
data,
|
||||
|
||||
Reference in New Issue
Block a user