Fix scroll issues on Starter Packs profile tab
Add proper ListFooterComponent with bottom padding to ensure the last starter pack item is always visible and scrollable. Previously, when viewing someone else's profile, no footer was rendered, causing the last item to be cut off - especially when starter packs had long descriptions. This follows the same pattern used in ProfilesList (fixed in #8039) and FeedsList components. Fixes #9296
This commit is contained in:
@@ -159,6 +159,17 @@ export function ProfileStarterPacks({
|
||||
[isTabletOrDesktop, t.atoms.border_contrast_low],
|
||||
)
|
||||
|
||||
const renderFooter = useCallback(() => {
|
||||
if (!data || items?.length === 0) {
|
||||
return null
|
||||
}
|
||||
return (
|
||||
<View style={[{paddingBottom: bottomBarOffset}]}>
|
||||
{isMe && <CreateAnother />}
|
||||
</View>
|
||||
)
|
||||
}, [data, items?.length, isMe, bottomBarOffset])
|
||||
|
||||
return (
|
||||
<View testID={testID} style={style}>
|
||||
<List
|
||||
@@ -172,7 +183,6 @@ export function ProfileStarterPacks({
|
||||
progressViewOffset={ios(0)}
|
||||
contentContainerStyle={{
|
||||
minHeight: height + headerOffset,
|
||||
paddingBottom: bottomBarOffset,
|
||||
}}
|
||||
removeClippedSubviews={true}
|
||||
desktopFixedHeight
|
||||
@@ -181,9 +191,7 @@ export function ProfileStarterPacks({
|
||||
ListEmptyComponent={
|
||||
data ? (isMe ? EmptyComponent : undefined) : FeedLoadingPlaceholder
|
||||
}
|
||||
ListFooterComponent={
|
||||
!!data && items?.length !== 0 && isMe ? CreateAnother : undefined
|
||||
}
|
||||
ListFooterComponent={renderFooter}
|
||||
/>
|
||||
</View>
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user