Skip to content

Commit

Permalink
Merge pull request #50 from ThatNinjaGuy/develop
Browse files Browse the repository at this point in the history
Authentication feature enabled with entitled views.
  • Loading branch information
ThatNinjaGuy committed Sep 14, 2024
2 parents 4dc1b3a + 014d308 commit 8066dc6
Show file tree
Hide file tree
Showing 18 changed files with 1,279 additions and 105 deletions.
172 changes: 94 additions & 78 deletions app/(tabs)/_layout.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,89 +3,105 @@ import React from "react";
import { TabBarIcon } from "@/components/navigation/TabBarIcon";
import { Colors } from "@/constants/Colors";
import { useColorScheme } from "@/hooks/useColorScheme";
import { AuthProvider } from "@/components/Authentication/AuthProvider";

export default function TabLayout() {
const colorScheme = useColorScheme();

return (
<Tabs
screenOptions={{
tabBarActiveTintColor: Colors[colorScheme ?? "light"].tint,
headerShown: true,
}}
>
<Tabs.Screen
name="index"
options={{
title: "Home",
tabBarIcon: ({ color, focused }) => (
<TabBarIcon
name={focused ? "home" : "home-outline"}
color={color}
/>
),
<AuthProvider>
<Tabs
screenOptions={{
tabBarActiveTintColor: Colors[colorScheme ?? "light"].tint,
headerShown: true,
}}
/>
<Tabs.Screen
name="tables"
options={{
title: "Tables",
tabBarIcon: ({ color, focused }) => (
<TabBarIcon
name={focused ? "code-slash" : "code-slash-outline"}
color={color}
/>
),
}}
/>
<Tabs.Screen
name="orders"
options={{
title: "Orders",
tabBarIcon: ({ color, focused }) => (
<TabBarIcon
name={focused ? "code-slash" : "code-slash-outline"}
color={color}
/>
),
}}
/>
<Tabs.Screen
name="menu"
options={{
title: "Menu",
tabBarIcon: ({ color, focused }) => (
<TabBarIcon
name={focused ? "restaurant" : "restaurant-outline"}
color={color}
/>
),
}}
/>
<Tabs.Screen
name="staffs"
options={{
title: "Staffs",
tabBarIcon: ({ color, focused }) => (
<TabBarIcon
name={focused ? "code-slash" : "code-slash-outline"}
color={color}
/>
),
}}
/>
<Tabs.Screen
name="inventory"
options={{
title: "Inventory",
tabBarIcon: ({ color, focused }) => (
<TabBarIcon
name={focused ? "code-slash" : "code-slash-outline"}
color={color}
/>
),
}}
/>
</Tabs>
>
<Tabs.Screen
name="index"
options={{
title: "Home",
tabBarIcon: ({ color, focused }) => (
<TabBarIcon
name={focused ? "home" : "home-outline"}
color={color}
/>
),
}}
/>
<Tabs.Screen
name="tables"
options={{
title: "Tables",
tabBarIcon: ({ color, focused }) => (
<TabBarIcon
name={focused ? "code-slash" : "code-slash-outline"}
color={color}
/>
),
}}
/>
<Tabs.Screen
name="orders"
options={{
title: "Orders",
tabBarIcon: ({ color, focused }) => (
<TabBarIcon
name={focused ? "code-slash" : "code-slash-outline"}
color={color}
/>
),
}}
/>
<Tabs.Screen
name="menu"
options={{
title: "Menu",
tabBarIcon: ({ color, focused }) => (
<TabBarIcon
name={focused ? "restaurant" : "restaurant-outline"}
color={color}
/>
),
}}
/>
<Tabs.Screen
name="staffs"
options={{
title: "Staffs",
tabBarIcon: ({ color, focused }) => (
<TabBarIcon
name={focused ? "code-slash" : "code-slash-outline"}
color={color}
/>
),
}}
/>
<Tabs.Screen
name="inventory"
options={{
title: "Inventory",
tabBarIcon: ({ color, focused }) => (
<TabBarIcon
name={focused ? "code-slash" : "code-slash-outline"}
color={color}
/>
),
}}
/>

<Tabs.Screen
name="admin"
options={{
title: "Admin",
tabBarIcon: ({ color, focused }) => (
<TabBarIcon
name={focused ? "code-slash" : "code-slash-outline"}
color={color}
/>
),
}}
/>
</Tabs>
</AuthProvider>
);
}
11 changes: 11 additions & 0 deletions app/(tabs)/admin.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import React from "react";
import ProfileScreen from "@/screens/ProfileScreen/ProfileScreen";
import { GestureHandlerRootView } from "react-native-gesture-handler";

export default function MenuScreen() {
return (
<GestureHandlerRootView style={{ flex: 1 }}>
<ProfileScreen />
</GestureHandlerRootView>
);
}
Loading

0 comments on commit 8066dc6

Please sign in to comment.