[🐴] Add end of list text, fix threshold (#4138)
* Add end of list text * onEndReachedThreshold
This commit is contained in:
parent
ad2d84fb05
commit
6cc040a94e
2 changed files with 18 additions and 2 deletions
|
@ -13,12 +13,14 @@ import {Text} from '#/components/Typography'
|
|||
|
||||
export function ListFooter({
|
||||
isFetchingNextPage,
|
||||
hasNextPage,
|
||||
error,
|
||||
onRetry,
|
||||
height,
|
||||
style,
|
||||
}: {
|
||||
isFetchingNextPage?: boolean
|
||||
hasNextPage?: boolean
|
||||
error?: string
|
||||
onRetry?: () => Promise<unknown>
|
||||
height?: number
|
||||
|
@ -40,7 +42,19 @@ export function ListFooter({
|
|||
{isFetchingNextPage ? (
|
||||
<Loader size="xl" />
|
||||
) : (
|
||||
<ListFooterMaybeError error={error} onRetry={onRetry} />
|
||||
<>
|
||||
{error ? (
|
||||
<ListFooterMaybeError error={error} onRetry={onRetry} />
|
||||
) : (
|
||||
<>
|
||||
{!hasNextPage && (
|
||||
<Text style={[a.text_sm, t.atoms.text_contrast_low]}>
|
||||
<Trans>End of list</Trans>
|
||||
</Text>
|
||||
)}
|
||||
</>
|
||||
)}
|
||||
</>
|
||||
)}
|
||||
</View>
|
||||
)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue