react-native-salespanda 0.3.0 → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Salespanda.podspec +4 -0
- package/android/build.gradle +2 -0
- package/lib/module/SalespandaApp.js +22 -8
- package/lib/module/SalespandaApp.js.map +1 -1
- package/lib/module/assets/images/bottomtabs/analytics.png +0 -0
- package/lib/module/assets/images/bottomtabs/analyticsactive.png +0 -0
- package/lib/module/assets/images/bottomtabs/crm.png +0 -0
- package/lib/module/assets/images/bottomtabs/crmactive.png +0 -0
- package/lib/module/assets/images/bottomtabs/diary.png +0 -0
- package/lib/module/assets/images/bottomtabs/diaryactive.png +0 -0
- package/lib/module/assets/images/bottomtabs/home.png +0 -0
- package/lib/module/assets/images/bottomtabs/homeactive.png +0 -0
- package/lib/module/assets/images/bottomtabs/notification.png +0 -0
- package/lib/module/assets/images/bottomtabs/notificationactive.png +0 -0
- package/lib/module/assets/images/index.js +35 -0
- package/lib/module/assets/images/index.js.map +1 -0
- package/lib/module/constants/Colors.js +17 -0
- package/lib/module/constants/Colors.js.map +1 -0
- package/lib/module/constants/GetPlatorm.js +23 -0
- package/lib/module/constants/GetPlatorm.js.map +1 -0
- package/lib/module/index.js +1 -1
- package/lib/module/index.js.map +1 -1
- package/lib/module/navigation/AppNavigator.js +3 -1
- package/lib/module/navigation/AppNavigator.js.map +1 -1
- package/lib/module/navigation/BottomTabNavigator.js +71 -53
- package/lib/module/navigation/BottomTabNavigator.js.map +1 -1
- package/lib/module/navigation/DrawerNavigator.js +210 -129
- package/lib/module/navigation/DrawerNavigator.js.map +1 -1
- package/lib/module/screens/CRMScreen.js +41 -0
- package/lib/module/screens/CRMScreen.js.map +1 -0
- package/lib/module/screens/HomeScreen.js +82 -88
- package/lib/module/screens/HomeScreen.js.map +1 -1
- package/lib/module/screens/NotificationsScreen.js +11 -97
- package/lib/module/screens/NotificationsScreen.js.map +1 -1
- package/lib/module/screens/ProfileScreen.js +13 -119
- package/lib/module/screens/ProfileScreen.js.map +1 -1
- package/lib/module/screens/ReportsScreen.js +11 -187
- package/lib/module/screens/ReportsScreen.js.map +1 -1
- package/lib/typescript/src/SalespandaApp.d.ts +1 -1
- package/lib/typescript/src/SalespandaApp.d.ts.map +1 -1
- package/lib/typescript/src/assets/images/index.d.ts +17 -0
- package/lib/typescript/src/assets/images/index.d.ts.map +1 -0
- package/lib/typescript/src/constants/Colors.d.ts +15 -0
- package/lib/typescript/src/constants/Colors.d.ts.map +1 -0
- package/lib/typescript/src/constants/GetPlatorm.d.ts +11 -0
- package/lib/typescript/src/constants/GetPlatorm.d.ts.map +1 -0
- package/lib/typescript/src/index.d.ts +1 -1
- package/lib/typescript/src/index.d.ts.map +1 -1
- package/lib/typescript/src/navigation/AppNavigator.d.ts.map +1 -1
- package/lib/typescript/src/navigation/BottomTabNavigator.d.ts.map +1 -1
- package/lib/typescript/src/navigation/DrawerNavigator.d.ts.map +1 -1
- package/lib/typescript/src/screens/CRMScreen.d.ts +2 -0
- package/lib/typescript/src/screens/CRMScreen.d.ts.map +1 -0
- package/lib/typescript/src/screens/HomeScreen.d.ts.map +1 -1
- package/lib/typescript/src/screens/NotificationsScreen.d.ts.map +1 -1
- package/lib/typescript/src/screens/ProfileScreen.d.ts.map +1 -1
- package/lib/typescript/src/screens/ReportsScreen.d.ts +1 -1
- package/lib/typescript/src/screens/ReportsScreen.d.ts.map +1 -1
- package/package.json +3 -1
- package/react-native.config.js +9 -0
- package/src/SalespandaApp.tsx +28 -8
- package/src/assets/images/bottomtabs/analytics.png +0 -0
- package/src/assets/images/bottomtabs/analyticsactive.png +0 -0
- package/src/assets/images/bottomtabs/crm.png +0 -0
- package/src/assets/images/bottomtabs/crmactive.png +0 -0
- package/src/assets/images/bottomtabs/diary.png +0 -0
- package/src/assets/images/bottomtabs/diaryactive.png +0 -0
- package/src/assets/images/bottomtabs/home.png +0 -0
- package/src/assets/images/bottomtabs/homeactive.png +0 -0
- package/src/assets/images/bottomtabs/notification.png +0 -0
- package/src/assets/images/bottomtabs/notificationactive.png +0 -0
- package/src/assets/images/index.js +11 -0
- package/src/assets/images/index.ts +40 -0
- package/src/constants/Colors.ts +16 -0
- package/src/constants/GetPlatorm.ts +29 -0
- package/src/index.tsx +1 -1
- package/src/navigation/AppNavigator.tsx +5 -1
- package/src/navigation/BottomTabNavigator.tsx +79 -24
- package/src/navigation/DrawerNavigator.tsx +176 -127
- package/src/screens/CRMScreen.tsx +34 -0
- package/src/screens/HomeScreen.tsx +94 -81
- package/src/screens/NotificationsScreen.tsx +9 -110
- package/src/screens/ProfileScreen.tsx +10 -97
- package/src/screens/ReportsScreen.tsx +9 -166
- package/lib/module/screens/PremiumScreen.js +0 -222
- package/lib/module/screens/PremiumScreen.js.map +0 -1
- package/lib/typescript/src/screens/PremiumScreen.d.ts +0 -2
- package/lib/typescript/src/screens/PremiumScreen.d.ts.map +0 -1
- package/src/screens/PremiumScreen.tsx +0 -250
|
@@ -5,7 +5,11 @@ import {
|
|
|
5
5
|
StyleSheet,
|
|
6
6
|
TouchableOpacity,
|
|
7
7
|
ScrollView,
|
|
8
|
+
Image,
|
|
9
|
+
FlatList,
|
|
10
|
+
Dimensions,
|
|
8
11
|
} from 'react-native';
|
|
12
|
+
import { Colors } from '../constants/Colors';
|
|
9
13
|
|
|
10
14
|
interface MenuItemProps {
|
|
11
15
|
title: string;
|
|
@@ -25,35 +29,78 @@ const MenuItem: React.FC<MenuItemProps> = ({ title, icon, onPress }) => {
|
|
|
25
29
|
};
|
|
26
30
|
|
|
27
31
|
export default function HomeScreen() {
|
|
32
|
+
const images = [
|
|
33
|
+
'https://images.unsplash.com/photo-1500530855697-b586d89ba3ee?q=80&w=1200&auto=format&fit=crop',
|
|
34
|
+
'https://images.unsplash.com/photo-1482192596544-9eb780fc7f66?q=80&w=1200&auto=format&fit=crop',
|
|
35
|
+
'https://images.unsplash.com/photo-1522071820081-009f0129c71c?q=80&w=1200&auto=format&fit=crop',
|
|
36
|
+
'https://images.unsplash.com/photo-1501785888041-af3ef285b470?q=80&w=1200&auto=format&fit=crop',
|
|
37
|
+
'https://images.unsplash.com/photo-1460353581641-37baddab0fa2?q=80&w=1200&auto=format&fit=crop',
|
|
38
|
+
'https://images.unsplash.com/photo-1496302662116-35cc4f36df92?q=80&w=1200&auto=format&fit=crop',
|
|
39
|
+
];
|
|
40
|
+
const screenWidth = Dimensions.get('window').width;
|
|
41
|
+
const [activeIndex, setActiveIndex] = React.useState(0);
|
|
42
|
+
const flatListRef = React.useRef<any>(null);
|
|
43
|
+
|
|
44
|
+
const handleMomentumScrollEnd = (e: any) => {
|
|
45
|
+
const offsetX = e.nativeEvent.contentOffset.x;
|
|
46
|
+
const index = Math.round(offsetX / screenWidth);
|
|
47
|
+
setActiveIndex(index);
|
|
48
|
+
};
|
|
49
|
+
React.useEffect(() => {
|
|
50
|
+
const id = setInterval(() => {
|
|
51
|
+
setActiveIndex((prev) => {
|
|
52
|
+
const next = (prev + 1) % images.length;
|
|
53
|
+
if (flatListRef.current) {
|
|
54
|
+
try {
|
|
55
|
+
flatListRef.current.scrollToIndex({ index: next, animated: true });
|
|
56
|
+
} catch {
|
|
57
|
+
// ignore scroll failures
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
return next;
|
|
61
|
+
});
|
|
62
|
+
}, 2500);
|
|
63
|
+
return () => clearInterval(id);
|
|
64
|
+
}, [images.length]);
|
|
65
|
+
|
|
28
66
|
return (
|
|
29
67
|
<ScrollView style={styles.scrollView}>
|
|
30
|
-
{/*
|
|
31
|
-
<View style={styles.
|
|
32
|
-
<
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
68
|
+
{/* Edge-to-edge Image Carousel */}
|
|
69
|
+
<View style={styles.carouselContainer}>
|
|
70
|
+
<FlatList
|
|
71
|
+
ref={flatListRef}
|
|
72
|
+
data={images}
|
|
73
|
+
keyExtractor={(_, idx) => `${idx}`}
|
|
74
|
+
renderItem={({ item }) => (
|
|
75
|
+
<Image
|
|
76
|
+
source={{ uri: item }}
|
|
77
|
+
style={[styles.carouselImage, { width: screenWidth }]}
|
|
78
|
+
/>
|
|
79
|
+
)}
|
|
80
|
+
horizontal
|
|
81
|
+
pagingEnabled
|
|
82
|
+
showsHorizontalScrollIndicator={false}
|
|
83
|
+
onMomentumScrollEnd={handleMomentumScrollEnd}
|
|
84
|
+
getItemLayout={(_, index) => ({
|
|
85
|
+
length: screenWidth,
|
|
86
|
+
offset: screenWidth * index,
|
|
87
|
+
index,
|
|
88
|
+
})}
|
|
89
|
+
/>
|
|
90
|
+
{/* Overlay Indicators at bottom of the image */}
|
|
91
|
+
<View style={styles.carouselIndicatorsOverlay}>
|
|
92
|
+
{images.map((_, idx) => (
|
|
93
|
+
<View
|
|
94
|
+
key={idx}
|
|
95
|
+
style={[
|
|
96
|
+
styles.indicator,
|
|
97
|
+
idx === activeIndex ? styles.activeIndicator : null,
|
|
98
|
+
]}
|
|
99
|
+
/>
|
|
100
|
+
))}
|
|
47
101
|
</View>
|
|
48
102
|
</View>
|
|
49
103
|
|
|
50
|
-
{/* Carousel Indicators */}
|
|
51
|
-
<View style={styles.carouselIndicators}>
|
|
52
|
-
<View style={[styles.indicator, styles.activeIndicator]} />
|
|
53
|
-
<View style={styles.indicator} />
|
|
54
|
-
<View style={styles.indicator} />
|
|
55
|
-
</View>
|
|
56
|
-
|
|
57
104
|
{/* Menu Grid */}
|
|
58
105
|
<View style={styles.menuGrid}>
|
|
59
106
|
<MenuItem title="Content Library" icon="📚" />
|
|
@@ -79,69 +126,35 @@ export default function HomeScreen() {
|
|
|
79
126
|
const styles = StyleSheet.create({
|
|
80
127
|
scrollView: {
|
|
81
128
|
flex: 1,
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
},
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
fontSize: 14,
|
|
99
|
-
lineHeight: 20,
|
|
100
|
-
marginBottom: 16,
|
|
101
|
-
},
|
|
102
|
-
startButton: {
|
|
103
|
-
backgroundColor: 'transparent',
|
|
104
|
-
borderWidth: 1,
|
|
105
|
-
borderColor: '#fff',
|
|
106
|
-
borderRadius: 20,
|
|
107
|
-
paddingVertical: 8,
|
|
108
|
-
paddingHorizontal: 16,
|
|
109
|
-
alignSelf: 'flex-start',
|
|
110
|
-
},
|
|
111
|
-
startButtonText: {
|
|
112
|
-
color: '#fff',
|
|
113
|
-
fontSize: 12,
|
|
114
|
-
fontWeight: '600',
|
|
115
|
-
},
|
|
116
|
-
whatsappIconContainer: {
|
|
117
|
-
marginLeft: 16,
|
|
118
|
-
},
|
|
119
|
-
whatsappIcon: {
|
|
120
|
-
width: 80,
|
|
121
|
-
height: 80,
|
|
122
|
-
borderRadius: 40,
|
|
123
|
-
backgroundColor: '#25D366',
|
|
124
|
-
justifyContent: 'center',
|
|
125
|
-
alignItems: 'center',
|
|
126
|
-
},
|
|
127
|
-
whatsappText: {
|
|
128
|
-
fontSize: 40,
|
|
129
|
-
},
|
|
130
|
-
carouselIndicators: {
|
|
129
|
+
backgroundColor: Colors.white,
|
|
130
|
+
},
|
|
131
|
+
carouselContainer: {
|
|
132
|
+
width: '100%',
|
|
133
|
+
backgroundColor: Colors.white, // subtle backplate for image load
|
|
134
|
+
position: 'relative',
|
|
135
|
+
},
|
|
136
|
+
carouselImage: {
|
|
137
|
+
height: 200,
|
|
138
|
+
resizeMode: 'cover',
|
|
139
|
+
},
|
|
140
|
+
carouselIndicatorsOverlay: {
|
|
141
|
+
position: 'absolute',
|
|
142
|
+
left: 0,
|
|
143
|
+
right: 0,
|
|
144
|
+
bottom: 12,
|
|
131
145
|
flexDirection: 'row',
|
|
132
146
|
justifyContent: 'center',
|
|
133
147
|
alignItems: 'center',
|
|
134
|
-
marginVertical: 16,
|
|
135
148
|
},
|
|
136
149
|
indicator: {
|
|
137
150
|
width: 8,
|
|
138
151
|
height: 8,
|
|
139
152
|
borderRadius: 4,
|
|
140
|
-
backgroundColor:
|
|
153
|
+
backgroundColor: Colors.divider,
|
|
141
154
|
marginHorizontal: 4,
|
|
142
155
|
},
|
|
143
156
|
activeIndicator: {
|
|
144
|
-
backgroundColor:
|
|
157
|
+
backgroundColor: Colors.white,
|
|
145
158
|
width: 24,
|
|
146
159
|
},
|
|
147
160
|
menuGrid: {
|
|
@@ -153,25 +166,25 @@ const styles = StyleSheet.create({
|
|
|
153
166
|
menuItem: {
|
|
154
167
|
width: '31%',
|
|
155
168
|
aspectRatio: 1,
|
|
156
|
-
backgroundColor:
|
|
169
|
+
backgroundColor: Colors.white,
|
|
157
170
|
borderRadius: 16,
|
|
158
171
|
padding: 12,
|
|
159
172
|
marginBottom: 12,
|
|
160
173
|
alignItems: 'center',
|
|
161
174
|
justifyContent: 'center',
|
|
162
|
-
shadowColor:
|
|
175
|
+
shadowColor: Colors.black,
|
|
163
176
|
shadowOffset: { width: 0, height: 2 },
|
|
164
177
|
shadowOpacity: 0.1,
|
|
165
178
|
shadowRadius: 4,
|
|
166
179
|
elevation: 3,
|
|
167
180
|
borderWidth: 1,
|
|
168
|
-
borderColor:
|
|
181
|
+
borderColor: Colors.border,
|
|
169
182
|
},
|
|
170
183
|
iconContainer: {
|
|
171
184
|
width: 50,
|
|
172
185
|
height: 50,
|
|
173
186
|
borderRadius: 25,
|
|
174
|
-
backgroundColor:
|
|
187
|
+
backgroundColor: Colors.divider,
|
|
175
188
|
justifyContent: 'center',
|
|
176
189
|
alignItems: 'center',
|
|
177
190
|
marginBottom: 8,
|
|
@@ -182,7 +195,7 @@ const styles = StyleSheet.create({
|
|
|
182
195
|
menuItemText: {
|
|
183
196
|
fontSize: 11,
|
|
184
197
|
textAlign: 'center',
|
|
185
|
-
color:
|
|
198
|
+
color: Colors.black,
|
|
186
199
|
fontWeight: '500',
|
|
187
200
|
},
|
|
188
201
|
});
|
|
@@ -1,75 +1,14 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
Text,
|
|
5
|
-
StyleSheet,
|
|
6
|
-
SafeAreaView,
|
|
7
|
-
ScrollView,
|
|
8
|
-
TouchableOpacity,
|
|
9
|
-
} from 'react-native';
|
|
10
|
-
|
|
11
|
-
interface NotificationItemProps {
|
|
12
|
-
title: string;
|
|
13
|
-
message: string;
|
|
14
|
-
time: string;
|
|
15
|
-
unread?: boolean;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
const NotificationItem: React.FC<NotificationItemProps> = ({
|
|
19
|
-
title,
|
|
20
|
-
message,
|
|
21
|
-
time,
|
|
22
|
-
unread = false,
|
|
23
|
-
}) => {
|
|
24
|
-
return (
|
|
25
|
-
<TouchableOpacity
|
|
26
|
-
style={[styles.notificationItem, unread && styles.unreadItem]}
|
|
27
|
-
>
|
|
28
|
-
<View style={styles.notificationContent}>
|
|
29
|
-
<Text style={styles.notificationTitle}>{title}</Text>
|
|
30
|
-
<Text style={styles.notificationMessage}>{message}</Text>
|
|
31
|
-
<Text style={styles.notificationTime}>{time}</Text>
|
|
32
|
-
</View>
|
|
33
|
-
{unread && <View style={styles.unreadDot} />}
|
|
34
|
-
</TouchableOpacity>
|
|
35
|
-
);
|
|
36
|
-
};
|
|
1
|
+
import { View, Text, StyleSheet, ScrollView } from 'react-native';
|
|
2
|
+
import { SafeAreaView } from 'react-native-safe-area-context';
|
|
3
|
+
import { Colors } from '../constants/Colors';
|
|
37
4
|
|
|
38
5
|
export default function NotificationsScreen() {
|
|
39
6
|
return (
|
|
40
|
-
<SafeAreaView style={styles.container}>
|
|
7
|
+
<SafeAreaView style={styles.container} edges={['bottom']}>
|
|
41
8
|
<View style={styles.header}>
|
|
42
|
-
<Text style={styles.headerTitle}>
|
|
9
|
+
<Text style={styles.headerTitle}>Notification</Text>
|
|
43
10
|
</View>
|
|
44
|
-
<ScrollView style={styles.scrollView}>
|
|
45
|
-
<NotificationItem
|
|
46
|
-
title="New Message"
|
|
47
|
-
message="You have a new message from support team"
|
|
48
|
-
time="2 minutes ago"
|
|
49
|
-
unread={true}
|
|
50
|
-
/>
|
|
51
|
-
<NotificationItem
|
|
52
|
-
title="Update Available"
|
|
53
|
-
message="A new version of the app is available"
|
|
54
|
-
time="1 hour ago"
|
|
55
|
-
unread={true}
|
|
56
|
-
/>
|
|
57
|
-
<NotificationItem
|
|
58
|
-
title="Campaign Success"
|
|
59
|
-
message="Your email campaign has been sent successfully"
|
|
60
|
-
time="3 hours ago"
|
|
61
|
-
/>
|
|
62
|
-
<NotificationItem
|
|
63
|
-
title="Reminder"
|
|
64
|
-
message="Don't forget to check your proposals"
|
|
65
|
-
time="Yesterday"
|
|
66
|
-
/>
|
|
67
|
-
<NotificationItem
|
|
68
|
-
title="Welcome"
|
|
69
|
-
message="Welcome to Salespanda! Get started with your first campaign"
|
|
70
|
-
time="2 days ago"
|
|
71
|
-
/>
|
|
72
|
-
</ScrollView>
|
|
11
|
+
<ScrollView style={styles.scrollView}></ScrollView>
|
|
73
12
|
</SafeAreaView>
|
|
74
13
|
);
|
|
75
14
|
}
|
|
@@ -77,59 +16,19 @@ export default function NotificationsScreen() {
|
|
|
77
16
|
const styles = StyleSheet.create({
|
|
78
17
|
container: {
|
|
79
18
|
flex: 1,
|
|
80
|
-
backgroundColor:
|
|
19
|
+
backgroundColor: Colors.background,
|
|
81
20
|
},
|
|
82
21
|
header: {
|
|
83
|
-
backgroundColor:
|
|
22
|
+
backgroundColor: Colors.white,
|
|
84
23
|
padding: 16,
|
|
85
|
-
borderBottomWidth: 1,
|
|
86
|
-
borderBottomColor: '#e0e0e0',
|
|
87
24
|
},
|
|
88
25
|
headerTitle: {
|
|
89
26
|
fontSize: 20,
|
|
90
27
|
fontWeight: '600',
|
|
91
|
-
color:
|
|
28
|
+
color: Colors.black,
|
|
92
29
|
textAlign: 'center',
|
|
93
30
|
},
|
|
94
31
|
scrollView: {
|
|
95
32
|
flex: 1,
|
|
96
33
|
},
|
|
97
|
-
notificationItem: {
|
|
98
|
-
backgroundColor: '#fff',
|
|
99
|
-
padding: 16,
|
|
100
|
-
marginHorizontal: 16,
|
|
101
|
-
marginTop: 16,
|
|
102
|
-
borderRadius: 12,
|
|
103
|
-
flexDirection: 'row',
|
|
104
|
-
justifyContent: 'space-between',
|
|
105
|
-
alignItems: 'center',
|
|
106
|
-
},
|
|
107
|
-
unreadItem: {
|
|
108
|
-
backgroundColor: '#f0f4ff',
|
|
109
|
-
},
|
|
110
|
-
notificationContent: {
|
|
111
|
-
flex: 1,
|
|
112
|
-
},
|
|
113
|
-
notificationTitle: {
|
|
114
|
-
fontSize: 16,
|
|
115
|
-
fontWeight: '600',
|
|
116
|
-
color: '#333',
|
|
117
|
-
marginBottom: 4,
|
|
118
|
-
},
|
|
119
|
-
notificationMessage: {
|
|
120
|
-
fontSize: 14,
|
|
121
|
-
color: '#666',
|
|
122
|
-
marginBottom: 8,
|
|
123
|
-
},
|
|
124
|
-
notificationTime: {
|
|
125
|
-
fontSize: 12,
|
|
126
|
-
color: '#999',
|
|
127
|
-
},
|
|
128
|
-
unreadDot: {
|
|
129
|
-
width: 10,
|
|
130
|
-
height: 10,
|
|
131
|
-
borderRadius: 5,
|
|
132
|
-
backgroundColor: '#4a148c',
|
|
133
|
-
marginLeft: 12,
|
|
134
|
-
},
|
|
135
34
|
});
|
|
@@ -1,55 +1,14 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
StyleSheet,
|
|
5
|
-
SafeAreaView,
|
|
6
|
-
TouchableOpacity,
|
|
7
|
-
Image,
|
|
8
|
-
} from 'react-native';
|
|
1
|
+
import { View, Text, StyleSheet, ScrollView } from 'react-native';
|
|
2
|
+
import { SafeAreaView } from 'react-native-safe-area-context';
|
|
3
|
+
import { Colors } from '../constants/Colors';
|
|
9
4
|
|
|
10
5
|
export default function ProfileScreen() {
|
|
11
6
|
return (
|
|
12
|
-
<SafeAreaView style={styles.container}>
|
|
7
|
+
<SafeAreaView style={styles.container} edges={['bottom']}>
|
|
13
8
|
<View style={styles.header}>
|
|
14
|
-
<Text style={styles.headerTitle}>
|
|
15
|
-
</View>
|
|
16
|
-
<View style={styles.content}>
|
|
17
|
-
<View style={styles.profileSection}>
|
|
18
|
-
<Image
|
|
19
|
-
source={{ uri: 'https://via.placeholder.com/100x100' }}
|
|
20
|
-
style={styles.avatar}
|
|
21
|
-
/>
|
|
22
|
-
<Text style={styles.name}>John Doe</Text>
|
|
23
|
-
<Text style={styles.email}>john.doe@example.com</Text>
|
|
24
|
-
</View>
|
|
25
|
-
|
|
26
|
-
<View style={styles.section}>
|
|
27
|
-
<TouchableOpacity style={styles.menuItem}>
|
|
28
|
-
<Text style={styles.menuItemIcon}>👤</Text>
|
|
29
|
-
<Text style={styles.menuItemText}>Edit Profile</Text>
|
|
30
|
-
</TouchableOpacity>
|
|
31
|
-
|
|
32
|
-
<TouchableOpacity style={styles.menuItem}>
|
|
33
|
-
<Text style={styles.menuItemIcon}>⚙️</Text>
|
|
34
|
-
<Text style={styles.menuItemText}>Settings</Text>
|
|
35
|
-
</TouchableOpacity>
|
|
36
|
-
|
|
37
|
-
<TouchableOpacity style={styles.menuItem}>
|
|
38
|
-
<Text style={styles.menuItemIcon}>🔔</Text>
|
|
39
|
-
<Text style={styles.menuItemText}>Notifications</Text>
|
|
40
|
-
</TouchableOpacity>
|
|
41
|
-
|
|
42
|
-
<TouchableOpacity style={styles.menuItem}>
|
|
43
|
-
<Text style={styles.menuItemIcon}>❓</Text>
|
|
44
|
-
<Text style={styles.menuItemText}>Help & Support</Text>
|
|
45
|
-
</TouchableOpacity>
|
|
46
|
-
|
|
47
|
-
<TouchableOpacity style={styles.menuItem}>
|
|
48
|
-
<Text style={styles.menuItemIcon}>🚪</Text>
|
|
49
|
-
<Text style={styles.menuItemText}>Logout</Text>
|
|
50
|
-
</TouchableOpacity>
|
|
51
|
-
</View>
|
|
9
|
+
<Text style={styles.headerTitle}>Anyaltics</Text>
|
|
52
10
|
</View>
|
|
11
|
+
<ScrollView style={styles.scrollView}></ScrollView>
|
|
53
12
|
</SafeAreaView>
|
|
54
13
|
);
|
|
55
14
|
}
|
|
@@ -57,65 +16,19 @@ export default function ProfileScreen() {
|
|
|
57
16
|
const styles = StyleSheet.create({
|
|
58
17
|
container: {
|
|
59
18
|
flex: 1,
|
|
60
|
-
backgroundColor:
|
|
19
|
+
backgroundColor: Colors.background,
|
|
61
20
|
},
|
|
62
21
|
header: {
|
|
63
|
-
backgroundColor:
|
|
22
|
+
backgroundColor: Colors.white,
|
|
64
23
|
padding: 16,
|
|
65
|
-
borderBottomWidth: 1,
|
|
66
|
-
borderBottomColor: '#e0e0e0',
|
|
67
24
|
},
|
|
68
25
|
headerTitle: {
|
|
69
26
|
fontSize: 20,
|
|
70
27
|
fontWeight: '600',
|
|
71
|
-
color:
|
|
28
|
+
color: Colors.black,
|
|
72
29
|
textAlign: 'center',
|
|
73
30
|
},
|
|
74
|
-
|
|
31
|
+
scrollView: {
|
|
75
32
|
flex: 1,
|
|
76
|
-
padding: 16,
|
|
77
|
-
},
|
|
78
|
-
profileSection: {
|
|
79
|
-
backgroundColor: '#fff',
|
|
80
|
-
borderRadius: 12,
|
|
81
|
-
padding: 24,
|
|
82
|
-
alignItems: 'center',
|
|
83
|
-
marginBottom: 16,
|
|
84
|
-
},
|
|
85
|
-
avatar: {
|
|
86
|
-
width: 100,
|
|
87
|
-
height: 100,
|
|
88
|
-
borderRadius: 50,
|
|
89
|
-
marginBottom: 16,
|
|
90
|
-
},
|
|
91
|
-
name: {
|
|
92
|
-
fontSize: 20,
|
|
93
|
-
fontWeight: '600',
|
|
94
|
-
color: '#333',
|
|
95
|
-
marginBottom: 4,
|
|
96
|
-
},
|
|
97
|
-
email: {
|
|
98
|
-
fontSize: 14,
|
|
99
|
-
color: '#666',
|
|
100
|
-
},
|
|
101
|
-
section: {
|
|
102
|
-
backgroundColor: '#fff',
|
|
103
|
-
borderRadius: 12,
|
|
104
|
-
overflow: 'hidden',
|
|
105
|
-
},
|
|
106
|
-
menuItem: {
|
|
107
|
-
flexDirection: 'row',
|
|
108
|
-
alignItems: 'center',
|
|
109
|
-
padding: 16,
|
|
110
|
-
borderBottomWidth: 1,
|
|
111
|
-
borderBottomColor: '#f0f0f0',
|
|
112
|
-
},
|
|
113
|
-
menuItemIcon: {
|
|
114
|
-
fontSize: 24,
|
|
115
|
-
marginRight: 16,
|
|
116
|
-
},
|
|
117
|
-
menuItemText: {
|
|
118
|
-
fontSize: 16,
|
|
119
|
-
color: '#333',
|
|
120
33
|
},
|
|
121
34
|
});
|