Update layouts on a bunch of views
This commit is contained in:
parent
9659625e8e
commit
df57c69f06
6 changed files with 37 additions and 26 deletions
|
@ -1,6 +1,7 @@
|
|||
import React from 'react'
|
||||
import {observer} from 'mobx-react-lite'
|
||||
import {FlatList, StyleSheet, View} from 'react-native'
|
||||
import {StyleSheet, View} from 'react-native'
|
||||
import {CenteredView, FlatList} from '../util/Views'
|
||||
import {NotificationsViewModel} from '../../../state/models/notifications-view'
|
||||
import {FeedItem} from './FeedItem'
|
||||
import {NotificationFeedLoadingPlaceholder} from '../util/LoadingPlaceholder'
|
||||
|
@ -60,10 +61,15 @@ export const Feed = observer(function Feed({
|
|||
}
|
||||
return (
|
||||
<View style={s.h100pct}>
|
||||
{view.isLoading && !data && <NotificationFeedLoadingPlaceholder />}
|
||||
{view.hasError && (
|
||||
<ErrorMessage message={view.error} onPressTryAgain={onPressTryAgain} />
|
||||
)}
|
||||
<CenteredView>
|
||||
{view.isLoading && !data && <NotificationFeedLoadingPlaceholder />}
|
||||
{view.hasError && (
|
||||
<ErrorMessage
|
||||
message={view.error}
|
||||
onPressTryAgain={onPressTryAgain}
|
||||
/>
|
||||
)}
|
||||
</CenteredView>
|
||||
{data && (
|
||||
<FlatList
|
||||
data={data}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue