-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathSuccessScreen.js
More file actions
45 lines (42 loc) · 1.85 KB
/
SuccessScreen.js
File metadata and controls
45 lines (42 loc) · 1.85 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
import React from 'react';
import { View, Text, Image, TouchableOpacity } from 'react-native';
import Screen from '../components/Screen';
import tw from 'tailwind-react-native-classnames';
import Constants from 'expo-constants'
import tailwind from 'tailwind-react-native-classnames'
import { Icon } from 'react-native-elements'
import { useNavigation } from '@react-navigation/native';
const SuccessScreen = ({ route }) => {
const { data } = route.params;
const navigation = useNavigation()
return (
<Screen style={tw`bg-white h-full justify-center`}>
<TouchableOpacity
style={[tailwind`bg-white p-3 rounded-full shadow-lg`, { top: Constants.statusBarHeight, left: 20, position: 'absolute', zIndex: 100 }]}
onPress={() => navigation.navigate("Home")}
>
<Icon
type="antdesign"
name="home"
color="black"
size={16}
/>
</TouchableOpacity>
<View style={tw`self-center`}>
<View style={tw`p-5 w-full `}>
<Image
source={require('../assets/car_animation.gif')}
style={tw`w-60 h-40`}
/>
</View>
<View style={tw`p-5 text-center self-center`}>
<Text style={tw`font-bold text-lg mb-3 text-center`}>Your {data?.title} is on the way</Text>
<Text style={tw`text-base text-center`}>Ride cost: ${data?.price}</Text>
<Text style={tw`text-base text-center`}>Estimated time: ${data?.time}</Text>
<Text style={tw`text-base text-center`}>Estimated distance: ${data?.distance}</Text>
</View>
</View>
</Screen>
);
}
export default SuccessScreen;