forked from solana-foundation/templates
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.tsx
More file actions
70 lines (67 loc) · 1.82 KB
/
index.tsx
File metadata and controls
70 lines (67 loc) · 1.82 KB
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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
import { View, Text, StyleSheet, Image, TouchableOpacity, Linking } from 'react-native'
import { ConnectButton } from '@/components/ConnectButton'
import { colors } from '@/lib/theme'
/**
* Home screen - displays welcome message and connect button
* This is the entry point of the app where users initiate Phantom Connect
* Updated for SDK v1.0.7 with latest Expo SDK 54
*/
export default function HomeScreen() {
/**
* Opens the Phantom documentation in the browser
*/
const openDocs = () => {
Linking.openURL('https://docs.phantom.com')
}
return (
<View style={styles.container}>
<Image source={require('@/assets/default.png')} style={styles.logo} resizeMode="contain" />
<Text style={styles.title}>Phantom Embedded Wallet</Text>
<Text style={styles.subtitle}>
Starter kit for integrating the Phantom React Native SDK with embedded wallets. Authenticate to create or
connect your Phantom wallet and view balances instantly.
</Text>
<ConnectButton />
<TouchableOpacity style={styles.linkButton} onPress={openDocs}>
<Text style={styles.linkText}>View Documentation →</Text>
</TouchableOpacity>
</View>
)
}
const styles = StyleSheet.create({
container: {
flex: 1,
justifyContent: 'center',
alignItems: 'center',
backgroundColor: colors.paper,
padding: 20,
},
logo: {
width: 80,
height: 80,
marginBottom: 24,
},
title: {
fontSize: 28,
fontWeight: 'bold',
color: colors.ink,
marginBottom: 12,
textAlign: 'center',
},
subtitle: {
fontSize: 16,
color: colors.gray400,
marginBottom: 32,
textAlign: 'center',
lineHeight: 24,
},
linkButton: {
marginTop: 24,
paddingVertical: 8,
},
linkText: {
fontSize: 14,
color: colors.brand,
fontWeight: '600',
},
})