Only render footer at end of list with items
Restore the check for data and items - footer should only render when there are starter packs in the list.
This commit is contained in:
@@ -161,6 +161,9 @@ export function ProfileStarterPacks({
|
|||||||
)
|
)
|
||||||
|
|
||||||
const renderFooter = useCallback(() => {
|
const renderFooter = useCallback(() => {
|
||||||
|
if (!data || items?.length === 0) {
|
||||||
|
return null
|
||||||
|
}
|
||||||
if (isMe) {
|
if (isMe) {
|
||||||
return <CreateAnother style={{paddingBottom: bottomBarOffset}} />
|
return <CreateAnother style={{paddingBottom: bottomBarOffset}} />
|
||||||
}
|
}
|
||||||
@@ -174,6 +177,8 @@ export function ProfileStarterPacks({
|
|||||||
/>
|
/>
|
||||||
)
|
)
|
||||||
}, [
|
}, [
|
||||||
|
data,
|
||||||
|
items?.length,
|
||||||
isMe,
|
isMe,
|
||||||
bottomBarOffset,
|
bottomBarOffset,
|
||||||
isFetchingNextPage,
|
isFetchingNextPage,
|
||||||
|
|||||||
Reference in New Issue
Block a user