Untitled

 avatar
user_9363972
javascript
a year ago
1.4 kB
5
Indexable
import React from "react";
import { NavigationContainer } from "@react-navigation/native";
import { createStackNavigator } from "@react-navigation/stack";

import DetailMovieScreen from "../screens/DetailMovieScreen";

import HomeScreenJSX from "../screens/HomeScreen";

const Stack = createStackNavigator();
const MainNavigator = () => {
  return (
    <NavigationContainer>
      <Stack.Navigator initialRouteName="Home">
        <Stack.Screen
          name="Home"
          component={HomeScreenJSX}
          options={{
            title: "Home",

            headerStyle: {
              backgroundColor: "#65c3ba",
            },
            headerTitleStyle: {
              color: "white",
              fontSize: 24,
            },
            headerTitleAlign: "center",
            headerLeft: null,
          }}
        />
        <Stack.Screen
          name="Detail"
          component={DetailMovieScreen}
          options={{
            title: "Detail",
            headerStyle: {
              backgroundColor: "#65c3ba",
            },
            headerTitleStyle: {
              color: "white",
              fontSize: 24,
            },
            headerTitleAlign: "center",
            headerLeft: null,
          }}
        />
      </Stack.Navigator>
    </NavigationContainer>
  );
};
export default MainNavigator;
Editor is loading...
Leave a Comment