Add pagination props to ListFooter and enable border top
Pass isFetchingNextPage, hasNextPage, error, and onRetry props to ListFooter for consistent pagination behavior. Remove borderTopWidth: 0 to allow the border top to render like other list implementations.
This commit is contained in:
@@ -168,9 +168,24 @@ export function ProfileStarterPacks({
|
||||
return <CreateAnother style={{paddingBottom: bottomBarOffset}} />
|
||||
}
|
||||
return (
|
||||
<ListFooter style={{paddingBottom: bottomBarOffset, borderTopWidth: 0}} />
|
||||
<ListFooter
|
||||
isFetchingNextPage={isFetchingNextPage}
|
||||
hasNextPage={hasNextPage}
|
||||
error={isError ? 'Could not load more starter packs' : undefined}
|
||||
onRetry={fetchNextPage}
|
||||
style={{paddingBottom: bottomBarOffset}}
|
||||
/>
|
||||
)
|
||||
}, [data, items?.length, isMe, bottomBarOffset])
|
||||
}, [
|
||||
data,
|
||||
items?.length,
|
||||
isMe,
|
||||
bottomBarOffset,
|
||||
isFetchingNextPage,
|
||||
hasNextPage,
|
||||
isError,
|
||||
fetchNextPage,
|
||||
])
|
||||
|
||||
return (
|
||||
<View testID={testID} style={style}>
|
||||
|
||||
Reference in New Issue
Block a user