From b9af7e0ca724b2aff565dc73681d6d1637a56bc5 Mon Sep 17 00:00:00 2001 From: Bagasbanuna02 Date: Tue, 8 Jul 2025 11:47:32 +0800 Subject: [PATCH] fix folder deksripsi: - pindah folder user search & notifikasi ke (user) --- app/(application)/(user)/_layout.tsx | 54 +++++++++++++ app/(application)/{ => (user)}/home.tsx | 0 .../(user)/notifications/index.tsx | 9 +++ .../(user)/user-search/index.tsx | 9 +++ app/(application)/_layout.tsx | 78 ++----------------- app/(application)/notifications/index.tsx | 9 --- app/(application)/user-search/index.tsx | 9 --- components/_ShareComponent/ViewWrapper.tsx | 3 +- screens/Authentication/RegisterView.tsx | 2 +- screens/Home/UiHome.tsx | 17 ++-- styles/header-styles.ts | 12 +++ 11 files changed, 98 insertions(+), 104 deletions(-) create mode 100644 app/(application)/(user)/_layout.tsx rename app/(application)/{ => (user)}/home.tsx (100%) create mode 100644 app/(application)/(user)/notifications/index.tsx create mode 100644 app/(application)/(user)/user-search/index.tsx delete mode 100644 app/(application)/notifications/index.tsx delete mode 100644 app/(application)/user-search/index.tsx create mode 100644 styles/header-styles.ts diff --git a/app/(application)/(user)/_layout.tsx b/app/(application)/(user)/_layout.tsx new file mode 100644 index 0000000..f7ae99d --- /dev/null +++ b/app/(application)/(user)/_layout.tsx @@ -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 ( + <> + + ( + router.push("/user-search")} + /> + ), + headerRight: () => ( + router.push("/notifications")} + /> + ), + }} + /> + + {/* User Search */} + , + }} + /> + + {/* Notification */} + , + }} + /> + + + ); +} diff --git a/app/(application)/home.tsx b/app/(application)/(user)/home.tsx similarity index 100% rename from app/(application)/home.tsx rename to app/(application)/(user)/home.tsx diff --git a/app/(application)/(user)/notifications/index.tsx b/app/(application)/(user)/notifications/index.tsx new file mode 100644 index 0000000..c497443 --- /dev/null +++ b/app/(application)/(user)/notifications/index.tsx @@ -0,0 +1,9 @@ +import { TextCustom, ViewWrapper } from "@/components"; + +export default function Notifications() { + return ( + + Notifications + + ); +} diff --git a/app/(application)/(user)/user-search/index.tsx b/app/(application)/(user)/user-search/index.tsx new file mode 100644 index 0000000..5995fb3 --- /dev/null +++ b/app/(application)/(user)/user-search/index.tsx @@ -0,0 +1,9 @@ +import { TextCustom, ViewWrapper } from "@/components"; + +export default function UserSearch() { + return ( + + User Search + + ); +} diff --git a/app/(application)/_layout.tsx b/app/(application)/_layout.tsx index 476d60c..3107323 100644 --- a/app/(application)/_layout.tsx +++ b/app/(application)/_layout.tsx @@ -1,47 +1,13 @@ -import { AccentColor, MainColor } from "@/constants/color-palet"; -import { GStyles } from "@/styles/global-styles"; +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 ApplicationLayout() { return ( <> - - ( - router.push("/(application)/user-search")} - /> - ), - headerRight: () => ( - router.push("/(application)/notifications")} - /> - ), - }} - /> + + {/* Event */} - ), }} - /> + /> */} - {/* User Search */} - ( - router.back()} - /> - ), - }} - /> - - {/* Notification */} - ( - router.back()} - /> - ), - }} - /> - {/* Take Picture */} - Notifications - - ); -} diff --git a/app/(application)/user-search/index.tsx b/app/(application)/user-search/index.tsx deleted file mode 100644 index 84ac4ad..0000000 --- a/app/(application)/user-search/index.tsx +++ /dev/null @@ -1,9 +0,0 @@ -import { Text, View } from "react-native"; - -export default function UserSearch() { - return ( - - User Search - - ) -} \ No newline at end of file diff --git a/components/_ShareComponent/ViewWrapper.tsx b/components/_ShareComponent/ViewWrapper.tsx index 31ea121..3feb459 100644 --- a/components/_ShareComponent/ViewWrapper.tsx +++ b/components/_ShareComponent/ViewWrapper.tsx @@ -28,7 +28,7 @@ const ViewWrapper = ({ <> diff --git a/screens/Authentication/RegisterView.tsx b/screens/Authentication/RegisterView.tsx index af10e51..53c5001 100644 --- a/screens/Authentication/RegisterView.tsx +++ b/screens/Authentication/RegisterView.tsx @@ -13,7 +13,7 @@ export default function RegisterView() { const [username, setUsername] = useState("Bagas Banuna"); const handleRegister = () => { console.log("Success register", username); - router.push("/(application)/home"); + router.push("/(application)/(user)/home"); }; return ( <> diff --git a/screens/Home/UiHome.tsx b/screens/Home/UiHome.tsx index 347feb2..e84df14 100644 --- a/screens/Home/UiHome.tsx +++ b/screens/Home/UiHome.tsx @@ -1,5 +1,5 @@ // import { ITabs } from "@/components/_Interface/types"; -import Spacing from "@/components/_ShareComponent/Spacing"; +import { StackCustom } from "@/components"; import ViewWrapper from "@/components/_ShareComponent/ViewWrapper"; import { useNavigation } from "expo-router"; import React, { useEffect } from "react"; @@ -16,21 +16,16 @@ export default function UiHome() { navigation.setOptions({}); }, [navigation]); - return ( <> }> - {/* Content Image */} - - + + - {/* Grid Section */} - - + - {/* Job Vacancy Section */} - - + + ); diff --git a/styles/header-styles.ts b/styles/header-styles.ts new file mode 100644 index 0000000..b8fcf64 --- /dev/null +++ b/styles/header-styles.ts @@ -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, + }, +};