Update layouts on a bunch of views

This commit is contained in:
Paul Frazee 2023-01-26 20:33:47 -06:00
parent 9659625e8e
commit df57c69f06
6 changed files with 37 additions and 26 deletions

View file

@ -1,6 +1,7 @@
import React, {useEffect} from 'react'
import {observer} from 'mobx-react-lite'
import {ActivityIndicator, FlatList, StyleSheet, View} from 'react-native'
import {ActivityIndicator, StyleSheet, View} from 'react-native'
import {CenteredView, FlatList} from '../util/Views'
import {
RepostedByViewModel,
RepostedByItem,
@ -42,9 +43,9 @@ export const PostRepostedBy = observer(function PostRepostedBy({
if (!view.hasLoaded) {
return (
<View>
<CenteredView>
<ActivityIndicator />
</View>
</CenteredView>
)
}
@ -52,9 +53,9 @@ export const PostRepostedBy = observer(function PostRepostedBy({
// =
if (view.hasError) {
return (
<View>
<CenteredView>
<ErrorMessage message={view.error} onPressTryAgain={onRefresh} />
</View>
</CenteredView>
)
}

View file

@ -1,6 +1,7 @@
import React, {useEffect} from 'react'
import {observer} from 'mobx-react-lite'
import {ActivityIndicator, FlatList, StyleSheet, View} from 'react-native'
import {ActivityIndicator, StyleSheet, View} from 'react-native'
import {CenteredView, FlatList} from '../util/Views'
import {VotesViewModel, VoteItem} from '../../../state/models/votes-view'
import {Link} from '../util/Link'
import {Text} from '../util/text/Text'
@ -38,9 +39,9 @@ export const PostVotedBy = observer(function PostVotedBy({
if (!view.hasLoaded) {
return (
<View>
<CenteredView>
<ActivityIndicator />
</View>
</CenteredView>
)
}
@ -48,9 +49,9 @@ export const PostVotedBy = observer(function PostVotedBy({
// =
if (view.hasError) {
return (
<View>
<CenteredView>
<ErrorMessage message={view.error} onPressTryAgain={onRefresh} />
</View>
</CenteredView>
)
}