diff --git a/native/account/registration/keyserver-selection.react.js b/native/account/registration/keyserver-selection.react.js index 4b6db1bd1..8ba43f6c9 100644 --- a/native/account/registration/keyserver-selection.react.js +++ b/native/account/registration/keyserver-selection.react.js @@ -1,45 +1,32 @@ // @flow -import { useHeaderHeight } from '@react-navigation/elements'; import * as React from 'react'; -import { View, Text } from 'react-native'; +import { Text } from 'react-native'; +import RegistrationContainer from './registration-container.react.js'; import type { RegistrationNavigationProp } from './registration-navigator.react.js'; import type { NavigationRoute } from '../../navigation/route-names.js'; import { useStyles } from '../../themes/colors.js'; type Props = { +navigation: RegistrationNavigationProp<'KeyserverSelection'>, +route: NavigationRoute<'KeyserverSelection'>, }; // eslint-disable-next-line no-unused-vars function KeyserverSelection(props: Props): React.Node { const styles = useStyles(unboundStyles); - - const headerHeight = useHeaderHeight(); - const backgroundStyle = React.useMemo( - () => ({ - ...styles.background, - marginTop: headerHeight, - }), - [headerHeight, styles.background], - ); - return ( - + Test Hello Test - + ); } const unboundStyles = { - background: { - backgroundColor: 'panelBackground', - }, testText: { fontSize: 24, color: 'white', }, }; export default KeyserverSelection; diff --git a/native/account/registration/registration-container.react.js b/native/account/registration/registration-container.react.js new file mode 100644 index 000000000..b3b833805 --- /dev/null +++ b/native/account/registration/registration-container.react.js @@ -0,0 +1,33 @@ +// @flow + +import { useHeaderHeight } from '@react-navigation/elements'; +import * as React from 'react'; +import { View } from 'react-native'; + +import { useStyles } from '../../themes/colors.js'; + +type Props = { + +children: React.Node, +}; +function RegistrationContainer(props: Props): React.Node { + const styles = useStyles(unboundStyles); + + const headerHeight = useHeaderHeight(); + const backgroundStyle = React.useMemo( + () => ({ + ...styles.background, + marginTop: headerHeight, + }), + [headerHeight, styles.background], + ); + + return {props.children}; +} + +const unboundStyles = { + background: { + backgroundColor: 'panelBackground', + }, +}; + +export default RegistrationContainer;