fix folder

deksripsi:
- pindah folder user search & notifikasi ke (user)
This commit is contained in:
2025-07-08 11:47:32 +08:00
parent 8abf23fd13
commit b9af7e0ca7
11 changed files with 98 additions and 104 deletions

View File

@@ -0,0 +1,54 @@
import { BackButton } from "@/components";
import { MainColor } from "@/constants/color-palet";
import { HeaderStyles } from "@/styles/header-styles";
import { Ionicons } from "@expo/vector-icons";
import { router, Stack } from "expo-router";
export default function UserLayout() {
return (
<>
<Stack screenOptions={HeaderStyles}>
<Stack.Screen
name="home"
options={{
title: "HIPMI",
headerLeft: () => (
<Ionicons
name="search"
size={20}
color={MainColor.yellow}
onPress={() => router.push("/user-search")}
/>
),
headerRight: () => (
<Ionicons
name="notifications"
size={20}
color={MainColor.yellow}
onPress={() => router.push("/notifications")}
/>
),
}}
/>
{/* User Search */}
<Stack.Screen
name="user-search/index"
options={{
title: "Pencarian Pengguna",
headerLeft: () => <BackButton />,
}}
/>
{/* Notification */}
<Stack.Screen
name="notifications/index"
options={{
title: "Notifikasi",
headerLeft: () => <BackButton />,
}}
/>
</Stack>
</>
);
}

View File

@@ -0,0 +1,9 @@
import { TextCustom, ViewWrapper } from "@/components";
export default function Notifications() {
return (
<ViewWrapper>
<TextCustom>Notifications</TextCustom>
</ViewWrapper>
);
}

View File

@@ -0,0 +1,9 @@
import { TextCustom, ViewWrapper } from "@/components";
export default function UserSearch() {
return (
<ViewWrapper>
<TextCustom>User Search</TextCustom>
</ViewWrapper>
);
}

View File

@@ -1,47 +1,13 @@
import { AccentColor, MainColor } from "@/constants/color-palet"; import { MainColor } from "@/constants/color-palet";
import { GStyles } from "@/styles/global-styles"; import { HeaderStyles } from "@/styles/header-styles";
import { Ionicons } from "@expo/vector-icons"; import { Ionicons } from "@expo/vector-icons";
import { router, Stack } from "expo-router"; import { router, Stack } from "expo-router";
export default function ApplicationLayout() { export default function ApplicationLayout() {
return ( return (
<> <>
<Stack <Stack screenOptions={HeaderStyles}>
screenOptions={{ <Stack.Screen name="(user)" options={{ headerShown: false }} />
headerStyle: GStyles.headerStyle,
headerTitleStyle: GStyles.headerTitleStyle,
headerTitleAlign: "center",
contentStyle: {
borderBottomColor: AccentColor.blue,
borderBottomWidth: 2,
},
// headerLargeStyle: {
// backgroundColor: MainColor.darkblue,
// },
}}
>
<Stack.Screen
name="home"
options={{
title: "HIPMI",
headerLeft: () => (
<Ionicons
name="search"
size={20}
color={MainColor.yellow}
onPress={() => router.push("/(application)/user-search")}
/>
),
headerRight: () => (
<Ionicons
name="notifications"
size={20}
color={MainColor.yellow}
onPress={() => router.push("/(application)/notifications")}
/>
),
}}
/>
<Stack.Screen <Stack.Screen
name="forum/index" name="forum/index"
@@ -105,7 +71,7 @@ export default function ApplicationLayout() {
/> />
{/* Event */} {/* Event */}
<Stack.Screen {/* <Stack.Screen
name="event/(tabs)" name="event/(tabs)"
options={{ options={{
title: "Event", title: "Event",
@@ -118,7 +84,7 @@ export default function ApplicationLayout() {
/> />
), ),
}} }}
/> /> */}
<Stack.Screen <Stack.Screen
name="event/detail/[id]" name="event/detail/[id]"
@@ -135,38 +101,6 @@ export default function ApplicationLayout() {
}} }}
/> />
{/* User Search */}
<Stack.Screen
name="user-search/index"
options={{
title: "Pencarian Pengguna",
headerLeft: () => (
<Ionicons
name="arrow-back"
size={20}
color={MainColor.yellow}
onPress={() => router.back()}
/>
),
}}
/>
{/* Notification */}
<Stack.Screen
name="notifications/index"
options={{
title: "Notifikasi",
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,9 +0,0 @@
import { Text, View } from "react-native";
export default function Notifications() {
return (
<View>
<Text>Notifications</Text>
</View>
);
}

View File

@@ -1,9 +0,0 @@
import { Text, View } from "react-native";
export default function UserSearch() {
return (
<View>
<Text>User Search</Text>
</View>
)
}

View File

@@ -28,7 +28,7 @@ const ViewWrapper = ({
<> <>
<KeyboardAvoidingView <KeyboardAvoidingView
behavior={Platform.OS === "ios" ? "padding" : "height"} behavior={Platform.OS === "ios" ? "padding" : "height"}
style={{ flex: 1 }} style={{ flex: 1, backgroundColor: MainColor.darkblue }}
> >
<ScrollView <ScrollView
contentContainerStyle={{ flexGrow: 1 }} contentContainerStyle={{ flexGrow: 1 }}
@@ -57,7 +57,6 @@ const ViewWrapper = ({
<SafeAreaView <SafeAreaView
edges={["bottom"]} edges={["bottom"]}
style={{ style={{
flex: 1,
backgroundColor: MainColor.darkblue, backgroundColor: MainColor.darkblue,
}} }}
> >

View File

@@ -13,7 +13,7 @@ export default function RegisterView() {
const [username, setUsername] = useState("Bagas Banuna"); const [username, setUsername] = useState("Bagas Banuna");
const handleRegister = () => { const handleRegister = () => {
console.log("Success register", username); console.log("Success register", username);
router.push("/(application)/home"); router.push("/(application)/(user)/home");
}; };
return ( return (
<> <>

View File

@@ -1,5 +1,5 @@
// import { ITabs } from "@/components/_Interface/types"; // import { ITabs } from "@/components/_Interface/types";
import Spacing from "@/components/_ShareComponent/Spacing"; import { StackCustom } from "@/components";
import ViewWrapper from "@/components/_ShareComponent/ViewWrapper"; import ViewWrapper from "@/components/_ShareComponent/ViewWrapper";
import { useNavigation } from "expo-router"; import { useNavigation } from "expo-router";
import React, { useEffect } from "react"; import React, { useEffect } from "react";
@@ -16,21 +16,16 @@ export default function UiHome() {
navigation.setOptions({}); navigation.setOptions({});
}, [navigation]); }, [navigation]);
return ( return (
<> <>
<ViewWrapper footerComponent={<TabSection tabs={tabsHome} />}> <ViewWrapper footerComponent={<TabSection tabs={tabsHome} />}>
{/* Content Image */} <StackCustom>
<Home_ImageSection /> <Home_ImageSection />
<Spacing height={10} />
{/* Grid Section */} <Home_FeatureSection />
<Home_FeatureSection />
<Spacing height={10} />
{/* Job Vacancy Section */} <Home_BottomFeatureSection />
<Home_BottomFeatureSection /> </StackCustom>
<Spacing height={20} />
</ViewWrapper> </ViewWrapper>
</> </>
); );

12
styles/header-styles.ts Normal file
View File

@@ -0,0 +1,12 @@
import { AccentColor } from "@/constants/color-palet";
import { NativeStackNavigationOptions } from "@react-navigation/native-stack";
import { GStyles } from "./global-styles";
export const HeaderStyles: NativeStackNavigationOptions = {
headerStyle: GStyles.headerStyle,
headerTitleStyle: GStyles.headerTitleStyle,
headerTitleAlign: "center",
contentStyle: {
borderBottomColor: AccentColor.blue,
},
};