-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathRoutes.tsx
46 lines (41 loc) · 1.31 KB
/
Routes.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
import { createStackNavigator } from "@react-navigation/stack";
import { fonts } from "../style";
import { Search, Splash, Pokemon } from "../views";
import { Home } from "../views/Home";
import { RootStackParamList } from "./routes.types";
import { SearchBar } from "react-native-elements";
import { EvilIcons, Feather, Ionicons } from "@expo/vector-icons";
import React from "react";
import { Animated, TextInput, View, StatusBar } from "react-native";
import { Header } from "../components/header";
const RootStack = createStackNavigator<RootStackParamList>();
export const Routes = () => (
<RootStack.Navigator
initialRouteName="Splash"
screenOptions={{
headerShown: false,
}}
>
<RootStack.Screen name="Splash" component={Splash} />
<RootStack.Screen name="Search" component={Search} />
<RootStack.Screen name="Pokemon" component={Pokemon} />
</RootStack.Navigator>
);
type HomeStackParamList = {
Home: undefined;
};
const HomeStack = createStackNavigator<HomeStackParamList>();
export const HomeNavigator = () => {
return (
<HomeStack.Navigator initialRouteName="Home">
<HomeStack.Screen
name="Home"
component={Home}
options={{
// headerTitle: "buddy",
header: () => <Header />,
}}
/>
</HomeStack.Navigator>
);
};