-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathHome.tsx
41 lines (37 loc) · 1.4 KB
/
Home.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
import { NativeStackNavigationProp } from "@react-navigation/native-stack";
import { ParamListBase } from "@react-navigation/native";
import { AndroidSafeAreaView } from "../components";
import { View, Text, TouchableOpacity } from "react-native";
import React from "react";
type Props = {
navigation: NativeStackNavigationProp<ParamListBase, "Home">;
};
const Home: React.FC<Props> = ({ navigation }) => {
return (
<AndroidSafeAreaView>
<View className="flex-1 justify-center items-center bg-gray-200 p-4">
<Text className="font-bold text-2xl">Home</Text>
<TouchableOpacity
className="bg-primary-500 px-8 py-3 rounded mt-5"
onPress={() => navigation.navigate("About")}
>
<Text className="text-white font-bold text-2xl">About</Text>
</TouchableOpacity>
<TouchableOpacity
className="bg-primary-500 px-8 py-3 rounded mt-5"
onPress={() => navigation.navigate("Register")}
>
<Text className="text-white font-bold text-2xl">Register</Text>
</TouchableOpacity>
{/* Login */}
<TouchableOpacity
className="bg-primary-500 px-8 py-3 rounded mt-5"
onPress={() => navigation.navigate("Login")}
>
<Text className="text-white font-bold text-2xl">Login</Text>
</TouchableOpacity>
</View>
</AndroidSafeAreaView>
);
};
export default Home;