fix folder
deksripsi: - pindah folder user search & notifikasi ke (user)
This commit is contained in:
54
app/(application)/(user)/_layout.tsx
Normal file
54
app/(application)/(user)/_layout.tsx
Normal 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>
|
||||
</>
|
||||
);
|
||||
}
|
||||
9
app/(application)/(user)/notifications/index.tsx
Normal file
9
app/(application)/(user)/notifications/index.tsx
Normal file
@@ -0,0 +1,9 @@
|
||||
import { TextCustom, ViewWrapper } from "@/components";
|
||||
|
||||
export default function Notifications() {
|
||||
return (
|
||||
<ViewWrapper>
|
||||
<TextCustom>Notifications</TextCustom>
|
||||
</ViewWrapper>
|
||||
);
|
||||
}
|
||||
9
app/(application)/(user)/user-search/index.tsx
Normal file
9
app/(application)/(user)/user-search/index.tsx
Normal file
@@ -0,0 +1,9 @@
|
||||
import { TextCustom, ViewWrapper } from "@/components";
|
||||
|
||||
export default function UserSearch() {
|
||||
return (
|
||||
<ViewWrapper>
|
||||
<TextCustom>User Search</TextCustom>
|
||||
</ViewWrapper>
|
||||
);
|
||||
}
|
||||
@@ -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 (
|
||||
<>
|
||||
<Stack
|
||||
screenOptions={{
|
||||
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 screenOptions={HeaderStyles}>
|
||||
<Stack.Screen name="(user)" options={{ headerShown: false }} />
|
||||
|
||||
<Stack.Screen
|
||||
name="forum/index"
|
||||
@@ -105,7 +71,7 @@ export default function ApplicationLayout() {
|
||||
/>
|
||||
|
||||
{/* Event */}
|
||||
<Stack.Screen
|
||||
{/* <Stack.Screen
|
||||
name="event/(tabs)"
|
||||
options={{
|
||||
title: "Event",
|
||||
@@ -118,7 +84,7 @@ export default function ApplicationLayout() {
|
||||
/>
|
||||
),
|
||||
}}
|
||||
/>
|
||||
/> */}
|
||||
|
||||
<Stack.Screen
|
||||
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 */}
|
||||
<Stack.Screen
|
||||
name="take-picture/[id]/index"
|
||||
|
||||
@@ -1,9 +0,0 @@
|
||||
import { Text, View } from "react-native";
|
||||
|
||||
export default function Notifications() {
|
||||
return (
|
||||
<View>
|
||||
<Text>Notifications</Text>
|
||||
</View>
|
||||
);
|
||||
}
|
||||
@@ -1,9 +0,0 @@
|
||||
import { Text, View } from "react-native";
|
||||
|
||||
export default function UserSearch() {
|
||||
return (
|
||||
<View>
|
||||
<Text>User Search</Text>
|
||||
</View>
|
||||
)
|
||||
}
|
||||
@@ -28,7 +28,7 @@ const ViewWrapper = ({
|
||||
<>
|
||||
<KeyboardAvoidingView
|
||||
behavior={Platform.OS === "ios" ? "padding" : "height"}
|
||||
style={{ flex: 1 }}
|
||||
style={{ flex: 1, backgroundColor: MainColor.darkblue }}
|
||||
>
|
||||
<ScrollView
|
||||
contentContainerStyle={{ flexGrow: 1 }}
|
||||
@@ -57,7 +57,6 @@ const ViewWrapper = ({
|
||||
<SafeAreaView
|
||||
edges={["bottom"]}
|
||||
style={{
|
||||
flex: 1,
|
||||
backgroundColor: MainColor.darkblue,
|
||||
}}
|
||||
>
|
||||
|
||||
@@ -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 (
|
||||
<>
|
||||
|
||||
@@ -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 (
|
||||
<>
|
||||
<ViewWrapper footerComponent={<TabSection tabs={tabsHome} />}>
|
||||
{/* Content Image */}
|
||||
<Home_ImageSection />
|
||||
<Spacing height={10} />
|
||||
<StackCustom>
|
||||
<Home_ImageSection />
|
||||
|
||||
{/* Grid Section */}
|
||||
<Home_FeatureSection />
|
||||
<Spacing height={10} />
|
||||
<Home_FeatureSection />
|
||||
|
||||
{/* Job Vacancy Section */}
|
||||
<Home_BottomFeatureSection />
|
||||
<Spacing height={20} />
|
||||
<Home_BottomFeatureSection />
|
||||
</StackCustom>
|
||||
</ViewWrapper>
|
||||
</>
|
||||
);
|
||||
|
||||
12
styles/header-styles.ts
Normal file
12
styles/header-styles.ts
Normal 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,
|
||||
},
|
||||
};
|
||||
Reference in New Issue
Block a user