Add web layout components
This commit is contained in:
parent
57d876a530
commit
d04a6d7539
6 changed files with 99 additions and 26 deletions
|
@ -1,6 +1,7 @@
|
|||
import React, {useRef} from 'react'
|
||||
import {observer} from 'mobx-react-lite'
|
||||
import {ActivityIndicator, FlatList, View} from 'react-native'
|
||||
import {ActivityIndicator, View} from 'react-native'
|
||||
import {CenteredView, FlatList} from '../util/Views'
|
||||
import {
|
||||
PostThreadViewModel,
|
||||
PostThreadViewPostModel,
|
||||
|
@ -50,9 +51,9 @@ export const PostThread = observer(function PostThread({
|
|||
// =
|
||||
if ((view.isLoading && !view.isRefreshing) || view.params.uri !== uri) {
|
||||
return (
|
||||
<View>
|
||||
<CenteredView>
|
||||
<ActivityIndicator />
|
||||
</View>
|
||||
</CenteredView>
|
||||
)
|
||||
}
|
||||
|
||||
|
@ -60,9 +61,9 @@ export const PostThread = observer(function PostThread({
|
|||
// =
|
||||
if (view.hasError) {
|
||||
return (
|
||||
<View>
|
||||
<CenteredView>
|
||||
<ErrorMessage message={view.error} onPressTryAgain={onRefresh} />
|
||||
</View>
|
||||
</CenteredView>
|
||||
)
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue