From df57c69f0618948f945af7549c4b0b13a096b1b1 Mon Sep 17 00:00:00 2001 From: Paul Frazee Date: Thu, 26 Jan 2023 20:33:47 -0600 Subject: Update layouts on a bunch of views --- src/view/com/notifications/Feed.tsx | 16 +++++++++++----- src/view/com/post-thread/PostRepostedBy.tsx | 11 ++++++----- src/view/com/post-thread/PostVotedBy.tsx | 11 ++++++----- src/view/com/profile/ProfileFollowers.tsx | 11 ++++++----- src/view/com/profile/ProfileFollows.tsx | 11 ++++++----- src/view/screens/Log.tsx | 3 ++- 6 files changed, 37 insertions(+), 26 deletions(-) (limited to 'src') diff --git a/src/view/com/notifications/Feed.tsx b/src/view/com/notifications/Feed.tsx index 5f9cb129d..55e958c2b 100644 --- a/src/view/com/notifications/Feed.tsx +++ b/src/view/com/notifications/Feed.tsx @@ -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.isLoading && !data && } - {view.hasError && ( - - )} + + {view.isLoading && !data && } + {view.hasError && ( + + )} + {data && ( + - + ) } @@ -52,9 +53,9 @@ export const PostRepostedBy = observer(function PostRepostedBy({ // = if (view.hasError) { return ( - + - + ) } diff --git a/src/view/com/post-thread/PostVotedBy.tsx b/src/view/com/post-thread/PostVotedBy.tsx index 9fd53da5e..680bbadf4 100644 --- a/src/view/com/post-thread/PostVotedBy.tsx +++ b/src/view/com/post-thread/PostVotedBy.tsx @@ -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 ( - + - + ) } @@ -48,9 +49,9 @@ export const PostVotedBy = observer(function PostVotedBy({ // = if (view.hasError) { return ( - + - + ) } diff --git a/src/view/com/profile/ProfileFollowers.tsx b/src/view/com/profile/ProfileFollowers.tsx index 00207c4d2..13d134c39 100644 --- a/src/view/com/profile/ProfileFollowers.tsx +++ b/src/view/com/profile/ProfileFollowers.tsx @@ -1,10 +1,11 @@ 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 { UserFollowersViewModel, FollowerItem, } from '../../../state/models/user-followers-view' +import {CenteredView, FlatList} from '../util/Views' import {Link} from '../util/Link' import {Text} from '../util/text/Text' import {ErrorMessage} from '../util/error/ErrorMessage' @@ -43,9 +44,9 @@ export const ProfileFollowers = observer(function ProfileFollowers({ if (!view.hasLoaded) { return ( - + - + ) } @@ -53,9 +54,9 @@ export const ProfileFollowers = observer(function ProfileFollowers({ // = if (view.hasError) { return ( - + - + ) } diff --git a/src/view/com/profile/ProfileFollows.tsx b/src/view/com/profile/ProfileFollows.tsx index bd7e7a3ce..de2fe3324 100644 --- a/src/view/com/profile/ProfileFollows.tsx +++ b/src/view/com/profile/ProfileFollows.tsx @@ -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 { UserFollowsViewModel, FollowItem, @@ -43,9 +44,9 @@ export const ProfileFollows = observer(function ProfileFollows({ if (!view.hasLoaded) { return ( - + - + ) } @@ -53,9 +54,9 @@ export const ProfileFollows = observer(function ProfileFollows({ // = if (view.hasError) { return ( - + - + ) } diff --git a/src/view/screens/Log.tsx b/src/view/screens/Log.tsx index 62d79f482..c3e156dcb 100644 --- a/src/view/screens/Log.tsx +++ b/src/view/screens/Log.tsx @@ -1,7 +1,8 @@ import React, {useEffect} from 'react' -import {ScrollView, StyleSheet, TouchableOpacity, View} from 'react-native' +import {StyleSheet, TouchableOpacity, View} from 'react-native' import {observer} from 'mobx-react-lite' import {FontAwesomeIcon} from '@fortawesome/react-native-fontawesome' +import {ScrollView} from '../com/util/Views' import {useStores} from '../../state' import {ScreenParams} from '../routes' import {s} from '../lib/styles' -- cgit 1.4.1