Admin
Add: - app/(application)/(admin)/ ## No Issue
This commit is contained in:
43
app/(application)/(admin)/_layout.tsx
Normal file
43
app/(application)/(admin)/_layout.tsx
Normal file
@@ -0,0 +1,43 @@
|
||||
/* eslint-disable @typescript-eslint/no-unused-vars */
|
||||
import { AccentColor, MainColor } from "@/constants/color-palet";
|
||||
import { ICON_SIZE_SMALL } from "@/constants/constans-value";
|
||||
import { GStyles } from "@/styles/global-styles";
|
||||
import { FontAwesome6, Ionicons } from "@expo/vector-icons";
|
||||
import { Stack } from "expo-router";
|
||||
import { useState } from "react";
|
||||
|
||||
export default function AdminLayout() {
|
||||
const [openDrawer, setOpenDrawer] = useState(false);
|
||||
return (
|
||||
<>
|
||||
<Stack
|
||||
screenOptions={{
|
||||
headerStyle: GStyles.headerStyle,
|
||||
headerTitleStyle: GStyles.headerTitleStyle,
|
||||
headerTitleAlign: "center",
|
||||
contentStyle: {
|
||||
borderBottomColor: AccentColor.blue,
|
||||
},
|
||||
headerLeft: () => (
|
||||
<Ionicons
|
||||
name="menu"
|
||||
size={ICON_SIZE_SMALL}
|
||||
color={MainColor.white}
|
||||
/>
|
||||
),
|
||||
headerRight: () => (
|
||||
<FontAwesome6
|
||||
name="circle-user"
|
||||
size={ICON_SIZE_SMALL}
|
||||
color={MainColor.white}
|
||||
/>
|
||||
),
|
||||
}}
|
||||
>
|
||||
<Stack.Screen name="dashboard" options={{ title: "Dashboard" }} />
|
||||
<Stack.Screen name="maps" options={{ title: "Maps" }} />
|
||||
<Stack.Screen name="information" options={{ title: "Information" }} />
|
||||
</Stack>
|
||||
</>
|
||||
);
|
||||
}
|
||||
9
app/(application)/(admin)/dashboard.tsx
Normal file
9
app/(application)/(admin)/dashboard.tsx
Normal file
@@ -0,0 +1,9 @@
|
||||
import { Text } from "react-native";
|
||||
|
||||
export default function AdminDashboard() {
|
||||
return (
|
||||
<>
|
||||
<Text>Dashboard</Text>
|
||||
</>
|
||||
);
|
||||
}
|
||||
9
app/(application)/(admin)/information.tsx
Normal file
9
app/(application)/(admin)/information.tsx
Normal file
@@ -0,0 +1,9 @@
|
||||
import { Text } from "react-native";
|
||||
|
||||
export default function AdminInformation() {
|
||||
return (
|
||||
<>
|
||||
<Text>Information</Text>
|
||||
</>
|
||||
);
|
||||
}
|
||||
9
app/(application)/(admin)/maps.tsx
Normal file
9
app/(application)/(admin)/maps.tsx
Normal file
@@ -0,0 +1,9 @@
|
||||
import { Text } from "react-native";
|
||||
|
||||
export default function AdminMaps() {
|
||||
return (
|
||||
<>
|
||||
<Text>Maps</Text>
|
||||
</>
|
||||
);
|
||||
}
|
||||
@@ -7,6 +7,7 @@ export default function ApplicationLayout() {
|
||||
<>
|
||||
<Stack screenOptions={HeaderStyles}>
|
||||
<Stack.Screen name="(user)" options={{ headerShown: false }} />
|
||||
<Stack.Screen name="(admin)" options={{ headerShown: false }} />
|
||||
|
||||
{/* Take Picture */}
|
||||
<Stack.Screen
|
||||
|
||||
@@ -30,9 +30,9 @@ export default function LoginView() {
|
||||
const id = randomAlfabet + randomNumber + fixNumber;
|
||||
console.log("login user id :", id);
|
||||
|
||||
router.navigate("/verification");
|
||||
// router.navigate("/verification");
|
||||
// router.navigate(`/(application)/(user)/profile/${id}`);
|
||||
// router.navigate("/(application)/(user)/home");
|
||||
router.navigate("/(application)/(user)/home");
|
||||
// router.navigate(`/(application)/profile/${id}/edit`);
|
||||
// router.navigate(`/(application)/(user)/portofolio/${id}`)
|
||||
// router.navigate(`/(application)/(image)/preview-image/${id}`);
|
||||
|
||||
@@ -52,11 +52,17 @@ export const drawerItemsProfile = ({
|
||||
label: "Tambah portofolio",
|
||||
path: `/(application)/portofolio/${id}/create`,
|
||||
},
|
||||
// {
|
||||
// icon: "settings",
|
||||
// label: "Dashboard Admin",
|
||||
// path: `/(application)/profile/dashboard-admin`,
|
||||
// },
|
||||
{
|
||||
icon: (
|
||||
<Ionicons
|
||||
name="settings"
|
||||
size={ICON_SIZE_MEDIUM}
|
||||
color={AccentColor.white}
|
||||
/>
|
||||
),
|
||||
label: "Dashboard Admin",
|
||||
path: `/(application)/(admin)/dashboard`,
|
||||
},
|
||||
{
|
||||
icon: (
|
||||
<Ionicons
|
||||
|
||||
@@ -26,9 +26,14 @@ export default function Profile_MenuDrawerSection({
|
||||
<>
|
||||
{/* Menu Items */}
|
||||
<MenuDrawerDynamicGrid
|
||||
data={drawerItems}
|
||||
data={drawerItems.map((item) => ({
|
||||
icon: item.icon,
|
||||
label: item.label,
|
||||
path: item.path as any,
|
||||
color: item.color,
|
||||
}))}
|
||||
columns={4} // Ubah ke 2 jika ingin 2 kolom per baris
|
||||
onPressItem={handlePress}
|
||||
onPressItem={(item) => handlePress(item as any)}
|
||||
/>
|
||||
</>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user