Files
inji-wallet/screens/QrLogin/QrLoginSuccessMessage.tsx
abhip2565 5351a909b8 [INJIMOB-1240] : Fix face auth consent for minified view share (#1397)
* [INJIMOB-1240] Resolve conflicts

Signed-off-by: Abhishek Paul <paul.apaul.abhishek.ap@gmail.com>

* [INJIMOB-1240] Refactor scan machine and QrLogin machine

Signed-off-by: Abhishek Paul <paul.apaul.abhishek.ap@gmail.com>

* [INJIMOB-1240] Refactor scan machine and QrLogin machine

Signed-off-by: Abhishek Paul <paul.apaul.abhishek.ap@gmail.com>

* [INJIMOB-1240] Refactor scan machine and QrLogin machine

Signed-off-by: Abhishek Paul <paul.apaul.abhishek.ap@gmail.com>

* [INJIMOB-1240]: Fix.Share with selfie pop up bug

Signed-off-by: Abhishek Paul <paul.apaul.abhishek.ap@gmail.com>

* [INJIMOB-1240]: Refactor. scanMachine and qrLoginMachine

Signed-off-by: Abhishek Paul <paul.apaul.abhishek.ap@gmail.com>

* [INJIMOB-1240]: Refactor. scanMachine and qrLoginMachine

Signed-off-by: Abhishek Paul <paul.apaul.abhishek.ap@gmail.com>

---------

Signed-off-by: Abhishek Paul <paul.apaul.abhishek.ap@gmail.com>
2024-05-02 18:36:52 +05:30

63 lines
1.9 KiB
TypeScript

import React from 'react';
import {useTranslation} from 'react-i18next';
import {Image} from 'react-native';
import {Icon} from 'react-native-elements';
import {Modal} from '../../components/ui/Modal';
import {Centered, Button, Text, Column} from '../../components/ui';
import {Theme} from '../../components/ui/styleUtils';
import {useQrLogin} from './QrLoginController';
import {QrLoginRef} from '../../machines/QrLogin/QrLoginMachine';
import {getClientNameForCurrentLanguage} from '../../i18n';
export const QrLoginSuccess: React.FC<QrLoginSuccessProps> = props => {
const {t} = useTranslation('QrLogin');
const controller = useQrLogin(props);
return (
<Modal
isVisible={controller.isVerifyingSuccesful}
arrowLeft={true}
headerTitle={t('status')}
headerElevation={5}
onDismiss={controller.DISMISS}>
<Column
fill
align="space-between"
style={{display: props.isVisible ? 'flex' : 'none'}}>
<Centered padding={'60 25 0 25'} margin={'60 0'}>
<Image
source={controller.logoUrl ? {uri: controller.logoUrl} : null}
style={{width: 60, height: 60}}
/>
<Text
style={Theme.Styles.detailsText}
weight="semibold"
margin="20 0 0 0"
align="center">
{t('successMessage')}
{getClientNameForCurrentLanguage(controller.clientName)}
</Text>
</Centered>
<Column
style={{borderTopRightRadius: 27, borderTopLeftRadius: 27}}
padding="10 24"
margin="2 0 0 0"
elevation={2}>
<Button
title={t('ok')}
margin="0 0 12 0"
styles={Theme.ButtonStyles.radius}
onPress={props.onPress}
/>
</Column>
</Column>
</Modal>
);
};
interface QrLoginSuccessProps {
isVisible: boolean;
onPress: () => void;
service: QrLoginRef;
}