import { NavigationContainer } from "@react-navigation/native";
import { createNativeStackNavigator } from "@react-navigation/native-stack";
import * as React from "react";
import SplashScreen from "../screens/splash";
import Login from "../screens/auth/login";
import ForgetPassword from "../screens/auth/forget";
import { Colors } from "../constants/colors";
import HomeDrawer from "./drawerNav";
import ProfileScreen from "../screens/profile";
import EditOrderScreen from "../screens/orders/edit";
import EditCategoryScreen from "../screens/categories/edit";
import AddCategoryScreen from "../screens/categories/add";
import AddProductScreen from "../screens/products/add";
import EditProductScreen from "../screens/products/edit";
import ReviewsScreen from "../screens/review";
import SettingScreen from "../screens/settings";
import RegisterScreen from "../screens/auth/register";
import VerifyEmail from "../screens/auth/verifyEmail";
import ResetPassword from "../screens/auth/reset";
const Stack = createNativeStackNavigator();
const options = {
headerShown: true,
headerTitleStyle: {
color: Colors.primary,
fontSize: 16,
fontFamily: "Circular",
},
headerBackTitleVisible: false,
headerTintColor: Colors.primary,
headerTitleAlign: "center",
};
function AppNavigation() {
return (
<NavigationContainer>
<Stack.Navigator
screenOptions={{
headerShown: false,
}}
>
<Stack.Screen name="SplashScreen" component={SplashScreen} />
<Stack.Screen name="LoginScreen" component={Login} />
<Stack.Screen name="RegisterScreen" component={RegisterScreen} />
<Stack.Screen name="ForgetPassword" component={ForgetPassword} />
<Stack.Screen name="VerifyEmail" component={VerifyEmail} />
<Stack.Screen name="ResetPassword" component={ResetPassword} />
<Stack.Screen name="HomeDrawer" component={HomeDrawer} />
<Stack.Screen
name="ProfileScreen"
component={ProfileScreen}
options={{
...options,
headerTitle: "Profile",
}}
/>
<Stack.Screen
name="SettingScreen"
component={SettingScreen}
options={{
...options,
headerTitle: "Setting",
}}
/>
<Stack.Screen
name="ReviewsScreen"
component={ReviewsScreen}
options={{
...options,
headerTitle: "Reviews",
}}
/>
<Stack.Screen
name="AddCategoryScreen"
component={AddCategoryScreen}
options={{
...options,
headerTitle: "Add Category",
}}
/>
<Stack.Screen
name="EditCategoryScreen"
component={EditCategoryScreen}
options={{
...options,
headerTitle: "Edit Category",
}}
/>
<Stack.Screen
name="AddProductScreen"
component={AddProductScreen}
options={{
...options,
headerTitle: "Add Product",
}}
/>
<Stack.Screen
name="EditProductScreen"
component={EditProductScreen}
options={{
...options,
headerTitle: "Edit Product",
}}
/>
<Stack.Screen
name="EditOrderScreen"
component={EditOrderScreen}
options={{
...options,
headerTitle: "Edit Order",
}}
/>
</Stack.Navigator>
</NavigationContainer>
);
}
export default AppNavigation;
import { createNativeStackNavigator } from "@react-navigation/native-stack";
import * as React from "react";
import SplashScreen from "../screens/splash";
import Login from "../screens/auth/login";
import ForgetPassword from "../screens/auth/forget";
import { Colors } from "../constants/colors";
import HomeDrawer from "./drawerNav";
import ProfileScreen from "../screens/profile";
import EditOrderScreen from "../screens/orders/edit";
import EditCategoryScreen from "../screens/categories/edit";
import AddCategoryScreen from "../screens/categories/add";
import AddProductScreen from "../screens/products/add";
import EditProductScreen from "../screens/products/edit";
import ReviewsScreen from "../screens/review";
import SettingScreen from "../screens/settings";
import RegisterScreen from "../screens/auth/register";
import VerifyEmail from "../screens/auth/verifyEmail";
import ResetPassword from "../screens/auth/reset";
const Stack = createNativeStackNavigator();
const options = {
headerShown: true,
headerTitleStyle: {
color: Colors.primary,
fontSize: 16,
fontFamily: "Circular",
},
headerBackTitleVisible: false,
headerTintColor: Colors.primary,
headerTitleAlign: "center",
};
function AppNavigation() {
return (
<NavigationContainer>
<Stack.Navigator
screenOptions={{
headerShown: false,
}}
>
<Stack.Screen name="SplashScreen" component={SplashScreen} />
<Stack.Screen name="LoginScreen" component={Login} />
<Stack.Screen name="RegisterScreen" component={RegisterScreen} />
<Stack.Screen name="ForgetPassword" component={ForgetPassword} />
<Stack.Screen name="VerifyEmail" component={VerifyEmail} />
<Stack.Screen name="ResetPassword" component={ResetPassword} />
<Stack.Screen name="HomeDrawer" component={HomeDrawer} />
<Stack.Screen
name="ProfileScreen"
component={ProfileScreen}
options={{
...options,
headerTitle: "Profile",
}}
/>
<Stack.Screen
name="SettingScreen"
component={SettingScreen}
options={{
...options,
headerTitle: "Setting",
}}
/>
<Stack.Screen
name="ReviewsScreen"
component={ReviewsScreen}
options={{
...options,
headerTitle: "Reviews",
}}
/>
<Stack.Screen
name="AddCategoryScreen"
component={AddCategoryScreen}
options={{
...options,
headerTitle: "Add Category",
}}
/>
<Stack.Screen
name="EditCategoryScreen"
component={EditCategoryScreen}
options={{
...options,
headerTitle: "Edit Category",
}}
/>
<Stack.Screen
name="AddProductScreen"
component={AddProductScreen}
options={{
...options,
headerTitle: "Add Product",
}}
/>
<Stack.Screen
name="EditProductScreen"
component={EditProductScreen}
options={{
...options,
headerTitle: "Edit Product",
}}
/>
<Stack.Screen
name="EditOrderScreen"
component={EditOrderScreen}
options={{
...options,
headerTitle: "Edit Order",
}}
/>
</Stack.Navigator>
</NavigationContainer>
);
}
export default AppNavigation;