diff --git a/app/components/loading/__snapshots__/index.test.tsx.snap b/app/components/loading/__snapshots__/index.test.tsx.snap index 2e4648fcb2..cc6c389561 100644 --- a/app/components/loading/__snapshots__/index.test.tsx.snap +++ b/app/components/loading/__snapshots__/index.test.tsx.snap @@ -1,19 +1,7 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`Loading should match snapshot 1`] = ` - + { +const Loading = ({containerStyle, style, color}: LoadingProps) => { return ( - + ); }; const styles = StyleSheet.create({ - container: { - flex: 1, - justifyContent: 'center', - padding: 20, - maxHeight: 40, - }, lottie: { height: 32, width: 32, diff --git a/app/screens/channel/failed_channels/index.tsx b/app/screens/channel/failed_channels/index.tsx index 7d765567fe..2d5eb7f460 100644 --- a/app/screens/channel/failed_channels/index.tsx +++ b/app/screens/channel/failed_channels/index.tsx @@ -5,12 +5,14 @@ import {withDatabase} from '@nozbe/watermelondb/DatabaseProvider'; import withObservables from '@nozbe/with-observables'; import React, {useCallback, useState} from 'react'; import {useIntl} from 'react-intl'; +import {StyleSheet} from 'react-native'; import {retryInitialChannel} from '@actions/remote/retry'; import FailedAction from '@components/failed_action'; import Loading from '@components/loading'; import {MM_TABLES} from '@constants/database'; import {useServerUrl} from '@context/server'; +import {useTheme} from '@context/theme'; import type {WithDatabaseArgs} from '@typings/database/database'; import type TeamModel from '@typings/database/models/servers/team'; @@ -19,9 +21,18 @@ type FailedChannelsProps = { team: TeamModel; } +const style = StyleSheet.create({ + loadingContainer: { + flex: 1, + alignItems: 'center', + justifyContent: 'center', + }, +}); + const FailedChannels = ({team}: FailedChannelsProps) => { const intl = useIntl(); const serverUrl = useServerUrl(); + const theme = useTheme(); const [loading, setLoading] = useState(false); const title = intl.formatMessage({id: 'failed_action.something_wrong', defaultMessage: 'Something went wrong'}); @@ -37,7 +48,12 @@ const FailedChannels = ({team}: FailedChannelsProps) => { }, []); if (loading) { - return ; + return ( + + ); } return ( diff --git a/app/screens/channel/failed_teams/index.tsx b/app/screens/channel/failed_teams/index.tsx index d9f8364368..7cb549578e 100644 --- a/app/screens/channel/failed_teams/index.tsx +++ b/app/screens/channel/failed_teams/index.tsx @@ -8,10 +8,12 @@ import {retryInitialTeamAndChannel} from '@actions/remote/retry'; import FailedAction from '@components/failed_action'; import Loading from '@components/loading'; import {useServerUrl} from '@context/server'; +import {useTheme} from '@context/theme'; const FailedTeams = () => { const intl = useIntl(); const serverUrl = useServerUrl(); + const theme = useTheme(); const [loading, setLoading] = useState(false); const title = intl.formatMessage({id: 'failed_action.something_wrong', defaultMessage: 'Something went wrong'}); @@ -27,7 +29,16 @@ const FailedTeams = () => { }, []); if (loading) { - return ; + return ( + + ); } return ( diff --git a/app/screens/login/form.tsx b/app/screens/login/form.tsx index cfdfd487ac..ec08541645 100644 --- a/app/screens/login/form.tsx +++ b/app/screens/login/form.tsx @@ -64,7 +64,6 @@ const getStyleSheet = makeStyleSheetFromTheme((theme: Theme) => ({ marginRight: 10, padding: 0, top: -2, - flex: undefined, }, loginButton: { marginTop: 25, diff --git a/app/screens/mfa/index.tsx b/app/screens/mfa/index.tsx index 045a57be43..fc58cd5e01 100644 --- a/app/screens/mfa/index.tsx +++ b/app/screens/mfa/index.tsx @@ -76,7 +76,6 @@ const getStyleSheet = makeStyleSheetFromTheme((theme: Theme) => ({ marginRight: 10, padding: 0, top: -2, - flex: undefined, }, proceedButton: { marginTop: 32, diff --git a/app/screens/server/form.tsx b/app/screens/server/form.tsx index e723b7d2fb..ed27eddf6e 100644 --- a/app/screens/server/form.tsx +++ b/app/screens/server/form.tsx @@ -67,7 +67,6 @@ const getStyleSheet = makeStyleSheetFromTheme((theme: Theme) => ({ marginRight: 10, padding: 0, top: -2, - flex: undefined, }, loading: { height: 20,