mirror of
https://github.com/mosip/inji-wallet.git
synced 2026-04-20 03:00:24 -04:00
46 lines
1.4 KiB
TypeScript
46 lines
1.4 KiB
TypeScript
import React from 'react';
|
|
import { useTranslation } from 'react-i18next';
|
|
import { Icon } from 'react-native-elements';
|
|
import { MessageOverlay } from '../components/MessageOverlay';
|
|
import { Button, Centered, Column, Text } from '../components/ui';
|
|
import { Theme } from '../components/ui/styleUtils';
|
|
import { RootRouteProps } from '../routes';
|
|
import { useAuthScreen } from './AuthScreenController';
|
|
|
|
export const AuthScreen: React.FC<RootRouteProps> = (props) => {
|
|
const { t } = useTranslation('AuthScreen');
|
|
const controller = useAuthScreen(props);
|
|
|
|
return (
|
|
<Column
|
|
fill
|
|
padding={[32, 32, 32, 32]}
|
|
backgroundColor={Theme.Colors.whiteBackgroundColor}>
|
|
<MessageOverlay
|
|
isVisible={controller.alertMsg != ''}
|
|
onBackdropPress={controller.hideAlert}
|
|
title={controller.alertMsg}
|
|
/>
|
|
<Column>
|
|
<Text align="center">{t('header')}</Text>
|
|
</Column>
|
|
<Centered fill>
|
|
<Icon name="fingerprint" size={180} color={Theme.Colors.Icon} />
|
|
</Centered>
|
|
<Column>
|
|
<Button
|
|
title={t('useBiometrics')}
|
|
margin="0 0 8 0"
|
|
disabled={!controller.isBiometricsAvailable}
|
|
onPress={controller.useBiometrics}
|
|
/>
|
|
<Button
|
|
type="clear"
|
|
title={t('usePasscode')}
|
|
onPress={controller.usePasscode}
|
|
/>
|
|
</Column>
|
|
</Column>
|
|
);
|
|
};
|