diff --git a/src/account/AccountPickScreen.js b/src/account/AccountPickScreen.js
index 458402c42be..e6f49de692b 100644
--- a/src/account/AccountPickScreen.js
+++ b/src/account/AccountPickScreen.js
@@ -10,7 +10,7 @@ import type { AppNavigationProp } from '../nav/AppNavigator';
import * as NavigationService from '../nav/NavigationService';
import { useSelector, useDispatch } from '../react-redux';
import { getAccountStatuses } from '../selectors';
-import { Centerer, ZulipButton, Logo, Screen, ViewPlaceholder } from '../common';
+import { ZulipButton, Logo, Screen, ViewPlaceholder } from '../common';
import AccountList from './AccountList';
import {
navigateToRealmInputScreen,
@@ -84,21 +84,19 @@ export default function AccountPickScreen(props: Props) {
canGoBack={navigation.canGoBack()}
shouldShowLoadingBanner={false}
>
-
- {accounts.length === 0 && }
-
-
- {
- NavigationService.dispatch(navigateToRealmInputScreen());
- }}
- />
-
+ {accounts.length === 0 && }
+
+
+ {
+ NavigationService.dispatch(navigateToRealmInputScreen());
+ }}
+ />
);
}
diff --git a/src/common/Centerer.js b/src/common/Centerer.js
deleted file mode 100644
index fa1387b4cbb..00000000000
--- a/src/common/Centerer.js
+++ /dev/null
@@ -1,50 +0,0 @@
-/* @flow strict-local */
-import React, { PureComponent } from 'react';
-import { View } from 'react-native';
-import type { ViewStyleProp } from 'react-native/Libraries/StyleSheet/StyleSheet';
-
-import type { Node as React$Node } from 'react';
-import styles, { createStyleSheet } from '../styles';
-
-const componentStyles = createStyleSheet({
- centerer: {
- flex: 1,
- flexDirection: 'row',
- justifyContent: 'space-around',
- alignItems: 'center',
- },
- inner: {
- width: '100%',
- maxWidth: 480,
- },
-});
-
-type Props = $ReadOnly<{|
- style?: ViewStyleProp,
- children: React$Node,
- padding: boolean,
-|}>;
-
-/**
- * A layout component that centers wrapped components
- * horizontally and vertically.
- *
- * @prop [style] - Apply styles to wrapper component.
- * @prop children - Components to be centered.
- * @prop [padding] - Specifies if the components should be padded.
- */
-export default class Centerer extends PureComponent {
- static defaultProps = {
- padding: false,
- };
-
- render() {
- const { children, padding, style } = this.props;
-
- return (
-
- {children}
-
- );
- }
-}
diff --git a/src/common/index.js b/src/common/index.js
index 24e27c67149..79647a6f313 100644
--- a/src/common/index.js
+++ b/src/common/index.js
@@ -1,6 +1,5 @@
/* @flow strict-local */
export { default as UserAvatarWithPresence } from './UserAvatarWithPresence';
-export { default as Centerer } from './Centerer';
export { default as ComponentList } from './ComponentList';
export { default as ComponentWithOverlay } from './ComponentWithOverlay';
export { default as CountOverlay } from './CountOverlay';
diff --git a/src/start/AuthScreen.js b/src/start/AuthScreen.js
index eb55689ba70..fb83b80a62f 100644
--- a/src/start/AuthScreen.js
+++ b/src/start/AuthScreen.js
@@ -26,7 +26,7 @@ import {
import type { SpecificIconType } from '../common/Icons';
import { connect } from '../react-redux';
import styles from '../styles';
-import { Centerer, Screen, ZulipButton } from '../common';
+import { Screen, ZulipButton } from '../common';
import RealmInfo from './RealmInfo';
import { encodeParamsForUrl } from '../utils/url';
import * as webAuth from './webAuth';
@@ -316,36 +316,34 @@ class AuthScreen extends PureComponent {
return (
-
-
- {activeAuthentications(
- serverSettings.authentication_methods,
- serverSettings.external_authentication_methods,
- ).map(auth =>
- auth.name === 'apple' && Platform.OS === 'ios' ? (
- this.handleAuth(auth)}
- />
- ) : (
- this.handleAuth(auth)}
- />
- ),
- )}
-
+
+ {activeAuthentications(
+ serverSettings.authentication_methods,
+ serverSettings.external_authentication_methods,
+ ).map(auth =>
+ auth.name === 'apple' && Platform.OS === 'ios' ? (
+ this.handleAuth(auth)}
+ />
+ ) : (
+ this.handleAuth(auth)}
+ />
+ ),
+ )}
);
}