fix folder

deskripsi:
- pindah folder event ke (user)
This commit is contained in:
2025-07-08 11:58:32 +08:00
parent b9af7e0ca7
commit 6bac89c536
14 changed files with 57 additions and 77 deletions

View File

@@ -1,4 +1,5 @@
import { BackButton } from "@/components"; import { BackButton } from "@/components";
import LeftButtonCustom from "@/components/Button/BackButton";
import { MainColor } from "@/constants/color-palet"; import { MainColor } from "@/constants/color-palet";
import { HeaderStyles } from "@/styles/header-styles"; import { HeaderStyles } from "@/styles/header-styles";
import { Ionicons } from "@expo/vector-icons"; import { Ionicons } from "@expo/vector-icons";
@@ -48,6 +49,25 @@ export default function UserLayout() {
headerLeft: () => <BackButton />, headerLeft: () => <BackButton />,
}} }}
/> />
{/* Event */}
<Stack.Screen
name="event/(tabs)"
options={{
title: "Event",
headerLeft: () => (
<LeftButtonCustom path="/(application)/(user)/home" />
),
}}
/>
<Stack.Screen
name="event/detail/[id]"
options={{
title: "Event Detail",
headerLeft: () => <LeftButtonCustom />,
}}
/>
</Stack> </Stack>
</> </>
); );

View File

@@ -1,3 +1,4 @@
import { BackButton } from "@/components";
import { MainColor } from "@/constants/color-palet"; import { MainColor } from "@/constants/color-palet";
import { HeaderStyles } from "@/styles/header-styles"; import { HeaderStyles } from "@/styles/header-styles";
import { Ionicons } from "@expo/vector-icons"; import { Ionicons } from "@expo/vector-icons";
@@ -13,14 +14,7 @@ export default function ApplicationLayout() {
name="forum/index" name="forum/index"
options={{ options={{
title: "Forum", title: "Forum",
headerLeft: () => ( headerLeft: () => <BackButton />,
<Ionicons
name="arrow-back"
size={20}
color={MainColor.yellow}
onPress={() => router.back()}
/>
),
}} }}
/> />
@@ -28,14 +22,7 @@ export default function ApplicationLayout() {
name="maps/index" name="maps/index"
options={{ options={{
title: "Maps", title: "Maps",
headerLeft: () => ( headerLeft: () => <BackButton />,
<Ionicons
name="arrow-back"
size={20}
color={MainColor.yellow}
onPress={() => router.back()}
/>
),
}} }}
/> />
@@ -70,37 +57,6 @@ export default function ApplicationLayout() {
}} }}
/> />
{/* Event */}
{/* <Stack.Screen
name="event/(tabs)"
options={{
title: "Event",
headerLeft: () => (
<Ionicons
name="arrow-back"
size={20}
color={MainColor.yellow}
onPress={() => router.push("/(application)/home")}
/>
),
}}
/> */}
<Stack.Screen
name="event/detail/[id]"
options={{
title: "Detail",
headerLeft: () => (
<Ionicons
name="arrow-back"
size={20}
color={MainColor.yellow}
onPress={() => router.back()}
/>
),
}}
/>
{/* Take Picture */} {/* Take Picture */}
<Stack.Screen <Stack.Screen
name="take-picture/[id]/index" name="take-picture/[id]/index"

View File

@@ -1,4 +1,4 @@
import BackButton from "@/components/Button/BackButton"; import LeftButtonCustom from "@/components/Button/BackButton";
import ViewWrapper from "@/components/_ShareComponent/ViewWrapper"; import ViewWrapper from "@/components/_ShareComponent/ViewWrapper";
import { GStyles } from "@/styles/global-styles"; import { GStyles } from "@/styles/global-styles";
import { Stack, useLocalSearchParams } from "expo-router"; import { Stack, useLocalSearchParams } from "expo-router";
@@ -12,7 +12,7 @@ export default function Portofolio() {
<Stack.Screen <Stack.Screen
options={{ options={{
title: "Portofolio", title: "Portofolio",
headerLeft: () => <BackButton />, headerLeft: () => <LeftButtonCustom />,
// headerRight: () => ( // headerRight: () => (
// <TouchableOpacity onPress={openDrawer}> // <TouchableOpacity onPress={openDrawer}>
// <Ionicons // <Ionicons

View File

@@ -1,5 +1,5 @@
import BackButton from "@/components/Button/BackButton"; import LeftButtonCustom from "@/components/Button/BackButton";
import { GStyles } from "@/styles/global-styles"; import { GStyles } from "@/styles/global-styles";
import { Stack } from "expo-router"; import { Stack } from "expo-router";
@@ -12,7 +12,7 @@ export default function PortofolioLayout() {
headerTitleStyle: GStyles.headerTitleStyle, headerTitleStyle: GStyles.headerTitleStyle,
headerTitleAlign: "center", headerTitleAlign: "center",
headerBackButtonDisplayMode: "minimal", headerBackButtonDisplayMode: "minimal",
headerLeft: () => <BackButton />, headerLeft: () => <LeftButtonCustom />,
}} }}
> >
{/* <Stack.Screen name="[id]/index" options={{ title: "Portofolio" }} /> */} {/* <Stack.Screen name="[id]/index" options={{ title: "Portofolio" }} /> */}

View File

@@ -1,7 +1,7 @@
import { IMenuDrawerItem } from "@/components/_Interface/types"; import { IMenuDrawerItem } from "@/components/_Interface/types";
import ViewWrapper from "@/components/_ShareComponent/ViewWrapper"; import ViewWrapper from "@/components/_ShareComponent/ViewWrapper";
import AlertCustom from "@/components/Alert/AlertCustom"; import AlertCustom from "@/components/Alert/AlertCustom";
import BackButton from "@/components/Button/BackButton"; import LeftButtonCustom from "@/components/Button/BackButton";
import DrawerCustom from "@/components/Drawer/DrawerCustom"; import DrawerCustom from "@/components/Drawer/DrawerCustom";
import { MainColor } from "@/constants/color-palet"; import { MainColor } from "@/constants/color-palet";
import { DRAWER_HEIGHT } from "@/constants/constans-value"; import { DRAWER_HEIGHT } from "@/constants/constans-value";
@@ -89,7 +89,7 @@ export default function Profile() {
<Stack.Screen <Stack.Screen
options={{ options={{
title: "Profile", title: "Profile",
headerLeft: () => <BackButton />, headerLeft: () => <LeftButtonCustom />,
headerRight: () => ( headerRight: () => (
<TouchableOpacity onPress={openDrawer}> <TouchableOpacity onPress={openDrawer}>
<Ionicons <Ionicons

View File

@@ -1,16 +1,22 @@
import { Ionicons } from "@expo/vector-icons";
import { MainColor } from "@/constants/color-palet"; import { MainColor } from "@/constants/color-palet";
import { router } from "expo-router"; import { Ionicons } from "@expo/vector-icons";
import { Href, router } from "expo-router";
const BackButton = () => { /**
*
* @param path - path to navigate to ?
* @default router.back()
* @returns if path : router.replace(path) else router.back()
*/
const LeftButtonCustom = ({path}: {path?: Href}) => {
return ( return (
<Ionicons <Ionicons
name="arrow-back" name="arrow-back"
size={20} size={20}
color={MainColor.yellow} color={MainColor.yellow}
onPress={() => router.back()} onPress={() => path ? router.replace(path) : router.back()}
/> />
); );
}; };
export default BackButton; export default LeftButtonCustom;

View File

@@ -1,14 +1,14 @@
// Alert // Alert
import AlertCustom from "./Alert/AlertCustom"; import AlertCustom from "./Alert/AlertCustom";
// Button // Button
import BackButton from "./Button/BackButton"; import LeftButtonCustom from "./Button/BackButton";
import ButtonCustom from "./Button/ButtonCustom"; import ButtonCustom from "./Button/ButtonCustom";
// Drawer // Drawer
import DrawerCustom from "./Drawer/DrawerCustom"; import DrawerCustom from "./Drawer/DrawerCustom";
import MenuDrawerDynamicGrid from "./Drawer/MenuDrawerDynamicGird"; import MenuDrawerDynamicGrid from "./Drawer/MenuDrawerDynamicGird";
// ShareComponent // ShareComponent
import ViewWrapper from "./_ShareComponent/ViewWrapper";
import Spacing from "./_ShareComponent/Spacing"; import Spacing from "./_ShareComponent/Spacing";
import ViewWrapper from "./_ShareComponent/ViewWrapper";
// Text // Text
import TextCustom from "./Text/TextCustom"; import TextCustom from "./Text/TextCustom";
// TextInput // TextInput
@@ -18,7 +18,7 @@ import Grid from "./Grid/GridCustom";
// Box // Box
import BaseBox from "./Box/BaseBox"; import BaseBox from "./Box/BaseBox";
// Avatar // Avatar
import AvatarCustom from "./Image/AvatarCustom" import AvatarCustom from "./Image/AvatarCustom";
// Stack // Stack
import StackCustom from "./Stack/StackCustom"; import StackCustom from "./Stack/StackCustom";
// Select // Select
@@ -26,27 +26,25 @@ import SelectCustom from "./Select/SelectCustom";
export { export {
AlertCustom, AlertCustom,
// Avatar
AvatarCustom,
// Button // Button
BackButton, LeftButtonCustom as BackButton,
ButtonCustom, // Box
BaseBox, ButtonCustom,
// Drawer // Drawer
DrawerCustom, DrawerCustom,
MenuDrawerDynamicGrid, // Grid
Grid, MenuDrawerDynamicGrid,
// Select
SelectCustom,
// ShareComponent // ShareComponent
Spacing, Spacing,
ViewWrapper, // Stack
StackCustom,
// Text // Text
TextCustom, TextCustom,
// TextInput // TextInput
TextInputCustom, TextInputCustom, ViewWrapper
// Grid
Grid,
// Box
BaseBox,
// Avatar
AvatarCustom,
// Stack
StackCustom,
// Select
SelectCustom,
}; };

View File

@@ -9,7 +9,7 @@ export default function Home_FeatureSection() {
<View style={stylesHome.gridContainer}> <View style={stylesHome.gridContainer}>
<TouchableOpacity <TouchableOpacity
style={stylesHome.gridItem} style={stylesHome.gridItem}
onPress={() => router.push("/(application)/event/(tabs)")} onPress={() => router.push("/(application)/(user)/event/(tabs)")}
> >
<Ionicons name="analytics" size={48} color="white" /> <Ionicons name="analytics" size={48} color="white" />
<Text style={stylesHome.gridLabel}>Event</Text> <Text style={stylesHome.gridLabel}>Event</Text>