-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathApp.tsx
46 lines (36 loc) · 840 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
43
44
45
46
/**
* Google recaptcha V3 React Native App
* https://github.com/ashu777
*
* @format
*/
import React from 'react';
import {
SafeAreaView,
ScrollView,
StatusBar,
Text,
useColorScheme,
} from 'react-native';
import {
Colors
} from 'react-native/Libraries/NewAppScreen';
import RecaptchaV3 from 'react-native-secure-captcha-v3';
function App(): React.JSX.Element {
const isDarkMode = useColorScheme() === 'dark';
const backgroundStyle = {
backgroundColor: isDarkMode ? Colors.darker : Colors.lighter,
};
return (
<SafeAreaView style={backgroundStyle}>
<RecaptchaV3
baseUrl={'https://yourdomain.com'}
siteKeyV3={'YOUR_SITE_KEY'}
onReceiveToken={(token: any) => {
console.log('token:', token);
}}
/>
</SafeAreaView>
);
}
export default App;