-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathApp.tsx
42 lines (32 loc) · 989 Bytes
/
App.tsx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
import React from 'react';
import {SafeAreaView, NativeModules, Button, TextInput} from 'react-native';
const RNIdNow = NativeModules.RNIdNow;
function App() {
const [transactionToken, setTransactionToken] = React.useState('TST-ZZLHS');
const settings = {
companyId: 'solarisbankvideoidentbison',
environment: 'test',
showErrorSuccessScreen: false,
showVideoOverviewCheck: true,
transactionToken: 'TST-ZZLHS',
};
const startIdNow = async () => {
try {
const response = await RNIdNow.start(settings);
return { response };
} catch (error: any) {
console.error('Error with sdk', error);
}
};
return (
<SafeAreaView style={{flex: 1, justifyContent: 'center'}}>
<TextInput
placeholder="Enter Transaction Token"
value={transactionToken}
onChangeText={setTransactionToken}
/>
<Button title={'Start IDNow'} onPress={startIdNow} />
</SafeAreaView>
);
}
export default App;