Fix feed pagination on user profiles
This commit is contained in:
parent
b4ad0cff4b
commit
cb5a575bc8
7 changed files with 12 additions and 9 deletions
|
@ -3,11 +3,8 @@ import {observer} from 'mobx-react-lite'
|
|||
import {Text, View, FlatList} from 'react-native'
|
||||
import {FeedViewModel, FeedViewItemModel} from '../../../state/models/feed-view'
|
||||
import {FeedItem} from './FeedItem'
|
||||
import {useStores} from '../../../state'
|
||||
|
||||
export const Feed = observer(function Feed({feed}: {feed: FeedViewModel}) {
|
||||
const store = useStores()
|
||||
|
||||
// TODO optimize renderItem or FeedItem, we're getting this notice from RN: -prf
|
||||
// VirtualizedList: You have a large list that is slow to update - make sure your
|
||||
// renderItem function renders components that follow React performance best practices
|
||||
|
@ -26,7 +23,7 @@ export const Feed = observer(function Feed({feed}: {feed: FeedViewModel}) {
|
|||
{feed.isLoading && !feed.isRefreshing && !feed.hasContent && (
|
||||
<Text>Loading...</Text>
|
||||
)}
|
||||
{feed.hasError && <Text>{feed.errorStr}</Text>}
|
||||
{feed.hasError && <Text>{feed.error}</Text>}
|
||||
{feed.hasContent && (
|
||||
<FlatList
|
||||
data={feed.feed.slice()}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue