diff --git a/native/account/qr-code-screen.react.js b/native/account/qr-code-screen.react.js --- a/native/account/qr-code-screen.react.js +++ b/native/account/qr-code-screen.react.js @@ -8,11 +8,15 @@ import { qrCodeLinkURL } from 'lib/facts/links.js'; import { platformToIdentityDeviceType } from 'lib/types/identity-service-types.js'; import { getConfig } from 'lib/utils/config.js'; +import { usingRestoreFlow } from 'lib/utils/services-utils.js'; +import RegistrationButtonContainer from './registration/registration-button-container.react.js'; import RegistrationContainer from './registration/registration-container.react.js'; import RegistrationContentContainer from './registration/registration-content-container.react.js'; import type { SignInNavigationProp } from './sign-in-navigator.react.js'; +import LinkButton from '../components/link-button.react.js'; import type { NavigationRoute } from '../navigation/route-names.js'; +import { RestorePromptScreenRouteName } from '../navigation/route-names.js'; import { useStyles } from '../themes/colors.js'; type QRCodeScreenProps = { @@ -20,7 +24,6 @@ +route: NavigationRoute<'QRCodeScreen'>, }; -// eslint-disable-next-line no-unused-vars function QRCodeScreen(props: QRCodeScreenProps): React.Node { const { qrData, generateQRCode } = useQRAuthContext(); @@ -40,6 +43,23 @@ const styles = useStyles(unboundStyles); + let primaryRestoreButton = null; + const goToRestoreFlow = React.useCallback(() => { + props.navigation.navigate(RestorePromptScreenRouteName); + }, [props.navigation]); + if (usingRestoreFlow) { + primaryRestoreButton = ( + + + + + + ); + } + const { width } = useWindowDimensions(); const qrCodeSize = width * 0.7; @@ -74,6 +94,7 @@ + {primaryRestoreButton} ); } @@ -121,6 +142,9 @@ backgroundColor: 'panelForegroundLabel', alignSelf: 'center', }, + primaryRestoreButton: { + alignItems: 'center', + }, }; export default QRCodeScreen;