feature event

deskripsi:
- resourcing component event
This commit is contained in:
2025-06-30 16:41:17 +08:00
parent 5577ef5d1e
commit d58304a146
14 changed files with 177 additions and 29 deletions

View File

@@ -1,4 +1,5 @@
import { AccentColor, MainColor } from "@/constants/color-palet"; import { AccentColor, MainColor } from "@/constants/color-palet";
import { Styles } from "@/styles/global-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";
@@ -7,16 +8,16 @@ export default function ApplicationLayout() {
<> <>
<Stack <Stack
screenOptions={{ screenOptions={{
headerStyle: { backgroundColor: MainColor.darkblue }, headerStyle: Styles.headerStyle,
headerTitleStyle: { color: MainColor.yellow, fontWeight: "bold" }, headerTitleStyle: Styles.headerTitleStyle,
headerTitleAlign: "center", headerTitleAlign: "center",
contentStyle: { contentStyle: {
borderBottomColor: AccentColor.blue, borderBottomColor: AccentColor.blue,
borderBottomWidth: 2, borderBottomWidth: 2,
}, },
headerLargeStyle: { // headerLargeStyle: {
backgroundColor: MainColor.darkblue, // backgroundColor: MainColor.darkblue,
}, // },
}} }}
> >
<Stack.Screen <Stack.Screen
@@ -102,10 +103,26 @@ export default function ApplicationLayout() {
}} }}
/> />
{/* Event */}
<Stack.Screen <Stack.Screen
name="event/index" name="event/(tabs)"
options={{ options={{
title: "Event", 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: () => ( headerLeft: () => (
<Ionicons <Ionicons
name="arrow-back" name="arrow-back"
@@ -117,6 +134,7 @@ export default function ApplicationLayout() {
}} }}
/> />
{/* User Search */}
<Stack.Screen <Stack.Screen
name="user-search/index" name="user-search/index"
options={{ options={{
@@ -132,6 +150,7 @@ export default function ApplicationLayout() {
}} }}
/> />
{/* Notification */}
<Stack.Screen <Stack.Screen
name="notifications/index" name="notifications/index"
options={{ options={{

View File

@@ -0,0 +1,64 @@
import { MainColor } from "@/constants/color-palet";
import { FontAwesome5, Ionicons } from "@expo/vector-icons";
import { Tabs } from "expo-router";
export default function EventLayout() {
return (
<Tabs
screenOptions={{
headerShown: false,
tabBarActiveTintColor: MainColor.yellow,
tabBarInactiveTintColor: MainColor.white,
tabBarStyle: {
backgroundColor: MainColor.darkblue,
},
// tabBarButton: HapticTab,
// tabBarBackground: BlurTabBarBackground,
// tabBarStyle: Platform.select({
// ios: {
// // Use a transparent background on iOS to show the blur effect
// position: "absolute",
// },
// default: {},
// }),
}}
>
<Tabs.Screen
name="index"
options={{
title: "Home",
tabBarIcon: ({ color }) => (
<Ionicons size={20} name="home" color={color} />
),
}}
/>
<Tabs.Screen
name="status"
options={{
title: "Status",
tabBarIcon: ({ color }) => (
<Ionicons size={20} name="list" color={color} />
),
}}
/>
<Tabs.Screen
name="kontribusi"
options={{
title: "Kontribusi",
tabBarIcon: ({ color }) => (
<Ionicons size={20} name="extension-puzzle" color={color} />
),
}}
/>
<Tabs.Screen
name="riwayat"
options={{
title: "Riwayat",
tabBarIcon: ({ color }) => (
<FontAwesome5 size={20} name="history" color={color} />
),
}}
/>
</Tabs>
);
}

View File

@@ -0,0 +1,25 @@
import ViewWrapper from "@/components/_ShareComponent/ViewWrapper";
import { AccentColor, MainColor } from "@/constants/color-palet";
import { Styles } from "@/styles/global-styles";
import { router } from "expo-router";
import { Text, TouchableHighlight, View } from "react-native";
export default function Event() {
return (
<ViewWrapper>
<TouchableHighlight onPress={() => router.push("/event/detail/1")}>
<View
style={{
padding: 20,
backgroundColor: MainColor.darkblue,
borderRadius: 10,
borderColor: AccentColor.blue,
borderWidth: 1,
}}
>
<Text style={Styles.textLabel}>Event</Text>
</View>
</TouchableHighlight>
</ViewWrapper>
);
}

View File

@@ -0,0 +1,11 @@
import ViewWrapper from "@/components/_ShareComponent/ViewWrapper";
import { Styles } from "@/styles/global-styles";
import { Text } from "react-native";
export default function Kontribusi() {
return (
<ViewWrapper>
<Text style={Styles.textLabel}>Kontribusi</Text>
</ViewWrapper>
);
}

View File

@@ -0,0 +1,11 @@
import ViewWrapper from "@/components/_ShareComponent/ViewWrapper";
import { Styles } from "@/styles/global-styles";
import { Text } from "react-native";
export default function Riwayat() {
return (
<ViewWrapper>
<Text style={Styles.textLabel}>Riwayat</Text>
</ViewWrapper>
);
}

View File

@@ -0,0 +1,11 @@
import ViewWrapper from "@/components/_ShareComponent/ViewWrapper";
import { Styles } from "@/styles/global-styles";
import { Text } from "react-native";
export default function Status() {
return (
<ViewWrapper>
<Text style={Styles.textLabel}>Status</Text>
</ViewWrapper>
);
}

View File

@@ -0,0 +1,14 @@
import ViewWrapper from "@/components/_ShareComponent/ViewWrapper";
import { Styles } from "@/styles/global-styles";
import { useLocalSearchParams } from "expo-router";
import { Text } from "react-native";
export default function DetailEvent() {
const { id } = useLocalSearchParams();
console.log("id event >", id);
return (
<ViewWrapper>
<Text style={Styles.textLabel}>Detail Event {id}</Text>
</ViewWrapper>
);
}

View File

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

View File

@@ -1,9 +1,9 @@
import NewHomeView from "@/screens/Home/UiHome"; import UiHome from "@/screens/Home/UiHome";
export default function Application() { export default function Application() {
return ( return (
<> <>
<NewHomeView /> <UiHome />
</> </>
); );
} }

View File

@@ -1,6 +1,13 @@
import { Href } from "expo-router"; import { Href } from "expo-router";
export { ITabs }; export { ICustomTab, ITabs };
interface ICustomTab {
icon: string;
label: string;
isActive: boolean;
onPress: () => void;
}
interface ITabs { interface ITabs {
id: string; id: string;
@@ -9,5 +16,5 @@ interface ITabs {
label: string; label: string;
path: Href; path: Href;
isActive: boolean; isActive: boolean;
disabled: boolean; disabled?: boolean;
} }

View File

@@ -9,7 +9,7 @@ import TabSection from "./tabSection";
import { tabsHome } from "./tabsList"; import { tabsHome } from "./tabsList";
import Home_FeatureSection from "./topFeatureSection"; import Home_FeatureSection from "./topFeatureSection";
export default function NewHomeView() { export default function UiHome() {
const navigation = useNavigation(); const navigation = useNavigation();
useEffect(() => { useEffect(() => {

View File

@@ -1,16 +1,11 @@
import { ITabs } from "@/components/_Interface/types"; import { ICustomTab, ITabs } from "@/components/_Interface/types";
import { Styles } from "@/styles/global-styles"; import { Styles } from "@/styles/global-styles";
import { Ionicons } from "@expo/vector-icons"; import { Ionicons } from "@expo/vector-icons";
import { router } from "expo-router"; import { router } from "expo-router";
import React from "react"; import React from "react";
import { Text, TouchableOpacity, View } from "react-native"; import { Text, TouchableOpacity, View } from "react-native";
interface ICustomTab {
icon: string;
label: string;
isActive: boolean;
onPress: () => void;
}
const CustomTab = ({ icon, label, isActive, onPress }: ICustomTab) => ( const CustomTab = ({ icon, label, isActive, onPress }: ICustomTab) => (
<TouchableOpacity <TouchableOpacity
style={[Styles.tabItem, isActive && Styles.activeTab]} style={[Styles.tabItem, isActive && Styles.activeTab]}

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")} onPress={() => router.push("/(application)/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>

View File

@@ -49,7 +49,7 @@ export const Styles = StyleSheet.create({
// Stack Header Style // Stack Header Style
headerStyle: { headerStyle: {
backgroundColor: MainColor.darkblue, backgroundColor: AccentColor.darkblue,
}, },
headerTitleStyle: { headerTitleStyle: {
color: MainColor.yellow, color: MainColor.yellow,