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 { 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"
|
||||||
|
|||||||
@@ -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
|
<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,
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
|
|||||||
@@ -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 (
|
||||||
<>
|
<>
|
||||||
|
|||||||
@@ -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
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