-
Notifications
You must be signed in to change notification settings - Fork 0
/
App.tsx
37 lines (32 loc) · 1.05 KB
/
App.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
import React from "react";
import {useColorScheme} from "react-native";
import {Colors} from "react-native/Libraries/NewAppScreen";
import {MovieScreen} from "./src/screens/MovieScreen";
import {createNativeStackNavigator} from "@react-navigation/native-stack";
import {NavigationContainer} from "@react-navigation/native";
import MovieDetailsScreen from "./src/screens/MovieDetailsScreen";
const Stack = createNativeStackNavigator();
function App(): React.JSX.Element {
const isDarkMode = useColorScheme() === "dark";
const backgroundStyle = {
backgroundColor: isDarkMode ? Colors.darker : Colors.lighter,
flex: 1,
};
return (
<NavigationContainer>
<Stack.Navigator>
<Stack.Screen
name="Discover-Movies"
component={MovieScreen}
options={{title: "Discover Movies"}}
/>
<Stack.Screen
name="Movie-Details"
component={MovieDetailsScreen}
options={{title: "Movie Details"}}
/>
</Stack.Navigator>
</NavigationContainer>
);
}
export default App;