deskripsi:
Feat: event create Fix: tabs event # No Issue
This commit is contained in:
@@ -76,6 +76,13 @@ export default function UserLayout() {
|
|||||||
),
|
),
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
|
<Stack.Screen
|
||||||
|
name="event/create"
|
||||||
|
options={{
|
||||||
|
title: "Tambah Event",
|
||||||
|
headerLeft: () => <BackButton />,
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
|
||||||
<Stack.Screen
|
<Stack.Screen
|
||||||
name="event/detail/[id]"
|
name="event/detail/[id]"
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
import { MainColor } from "@/constants/color-palet";
|
import { AccentColor, MainColor } from "@/constants/color-palet";
|
||||||
import { FontAwesome5, Ionicons } from "@expo/vector-icons";
|
import { FontAwesome5, Ionicons } from "@expo/vector-icons";
|
||||||
import { Tabs } from "expo-router";
|
import { Tabs } from "expo-router";
|
||||||
|
import { Platform, View } from "react-native";
|
||||||
|
|
||||||
export default function EventLayout() {
|
export default function EventLayout() {
|
||||||
return (
|
return (
|
||||||
@@ -9,18 +10,20 @@ export default function EventLayout() {
|
|||||||
headerShown: false,
|
headerShown: false,
|
||||||
tabBarActiveTintColor: MainColor.yellow,
|
tabBarActiveTintColor: MainColor.yellow,
|
||||||
tabBarInactiveTintColor: MainColor.white_gray,
|
tabBarInactiveTintColor: MainColor.white_gray,
|
||||||
tabBarStyle: {
|
tabBarBackground: CustomTabBarBackground,
|
||||||
backgroundColor: MainColor.darkblue,
|
tabBarStyle: Platform.select({
|
||||||
|
ios: {
|
||||||
|
borderTopWidth: 0,
|
||||||
|
paddingTop: 5,
|
||||||
|
height: 65,
|
||||||
},
|
},
|
||||||
// tabBarButton: HapticTab,
|
android: {
|
||||||
// tabBarBackground: BlurTabBarBackground,
|
borderTopWidth: 0,
|
||||||
// tabBarStyle: Platform.select({
|
paddingTop: 5,
|
||||||
// ios: {
|
height: 115,
|
||||||
// // Use a transparent background on iOS to show the blur effect
|
},
|
||||||
// position: "absolute",
|
default: {},
|
||||||
// },
|
}),
|
||||||
// default: {},
|
|
||||||
// }),
|
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<Tabs.Screen
|
<Tabs.Screen
|
||||||
@@ -62,3 +65,16 @@ export default function EventLayout() {
|
|||||||
</Tabs>
|
</Tabs>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function CustomTabBarBackground() {
|
||||||
|
return (
|
||||||
|
<View
|
||||||
|
style={{
|
||||||
|
flex: 1,
|
||||||
|
backgroundColor: MainColor.darkblue,
|
||||||
|
borderTopWidth: 1,
|
||||||
|
borderTopColor: AccentColor.blue,
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
import ViewWrapper from "@/components/_ShareComponent/ViewWrapper";
|
import ViewWrapper from "@/components/_ShareComponent/ViewWrapper";
|
||||||
|
import FloatingButton from "@/components/Button/FloatingButton";
|
||||||
import { AccentColor, MainColor } from "@/constants/color-palet";
|
import { AccentColor, MainColor } from "@/constants/color-palet";
|
||||||
import { GStyles } from "@/styles/global-styles";
|
import { GStyles } from "@/styles/global-styles";
|
||||||
import { router } from "expo-router";
|
import { router } from "expo-router";
|
||||||
@@ -6,7 +7,11 @@ import { Text, TouchableHighlight, View } from "react-native";
|
|||||||
|
|
||||||
export default function Event() {
|
export default function Event() {
|
||||||
return (
|
return (
|
||||||
<ViewWrapper>
|
<ViewWrapper
|
||||||
|
floatingButton={
|
||||||
|
<FloatingButton onPress={() => router.push("/event/create")} />
|
||||||
|
}
|
||||||
|
>
|
||||||
<TouchableHighlight onPress={() => router.push("/event/detail/1")}>
|
<TouchableHighlight onPress={() => router.push("/event/detail/1")}>
|
||||||
<View
|
<View
|
||||||
style={{
|
style={{
|
||||||
|
|||||||
50
app/(application)/(user)/event/create.tsx
Normal file
50
app/(application)/(user)/event/create.tsx
Normal file
@@ -0,0 +1,50 @@
|
|||||||
|
import {
|
||||||
|
BoxButtonOnFooter,
|
||||||
|
ButtonCustom,
|
||||||
|
SelectCustom,
|
||||||
|
StackCustom,
|
||||||
|
TextAreaCustom,
|
||||||
|
TextInputCustom,
|
||||||
|
ViewWrapper
|
||||||
|
} from "@/components";
|
||||||
|
import { masterTypeEvent } from "@/lib/dummy-data/event/master-type-event";
|
||||||
|
|
||||||
|
export default function EventCreate() {
|
||||||
|
const buttonSubmit = (
|
||||||
|
<BoxButtonOnFooter>
|
||||||
|
<ButtonCustom title="Simpan" onPress={() => console.log("Simpan")} />
|
||||||
|
</BoxButtonOnFooter>
|
||||||
|
);
|
||||||
|
return (
|
||||||
|
<>
|
||||||
|
<ViewWrapper footerComponent={buttonSubmit}>
|
||||||
|
<StackCustom gap={"xs"}>
|
||||||
|
<TextInputCustom
|
||||||
|
label="Nama Event"
|
||||||
|
placeholder="Masukkan nama event"
|
||||||
|
required
|
||||||
|
/>
|
||||||
|
<SelectCustom
|
||||||
|
label="Tipe Event"
|
||||||
|
placeholder="Pilih tipe event"
|
||||||
|
data={masterTypeEvent}
|
||||||
|
onChange={(value) => console.log(value)}
|
||||||
|
/>
|
||||||
|
<TextInputCustom
|
||||||
|
label="Lokasi"
|
||||||
|
placeholder="Masukkan lokasi event"
|
||||||
|
required
|
||||||
|
/>
|
||||||
|
|
||||||
|
<TextAreaCustom
|
||||||
|
label="Deskripsi"
|
||||||
|
placeholder="Masukkan deskripsi event"
|
||||||
|
required
|
||||||
|
showCount
|
||||||
|
maxLength={100}
|
||||||
|
/>
|
||||||
|
</StackCustom>
|
||||||
|
</ViewWrapper>
|
||||||
|
</>
|
||||||
|
);
|
||||||
|
}
|
||||||
@@ -79,7 +79,7 @@ const TextAreaCustom: React.FC<TextAreaCustomProps> = ({
|
|||||||
};
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<View style={GStyles.inputContainerArea}>
|
<View style={[GStyles.inputContainerArea]}>
|
||||||
{label && (
|
{label && (
|
||||||
<Text style={GStyles.inputLabel}>
|
<Text style={GStyles.inputLabel}>
|
||||||
{label}
|
{label}
|
||||||
|
|||||||
8
lib/dummy-data/event/master-type-event.tsx
Normal file
8
lib/dummy-data/event/master-type-event.tsx
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
export const masterTypeEvent = [
|
||||||
|
{ label: "Seminar", value: "seminar" },
|
||||||
|
{ label: "Workshop", value: "workshop" },
|
||||||
|
{ label: "Lomba", value: "lomba" },
|
||||||
|
{ label: "Pameran", value: "pameran" },
|
||||||
|
{ label: "Kegiatan Sosial", value: "kegiatan_sosial" },
|
||||||
|
{ label: "Musyawarah", value: "musyawarah" },
|
||||||
|
];
|
||||||
@@ -30,12 +30,13 @@ export default function LoginView() {
|
|||||||
const id = randomAlfabet + randomNumber + fixNumber;
|
const id = randomAlfabet + randomNumber + fixNumber;
|
||||||
console.log("login user id :", id);
|
console.log("login user id :", id);
|
||||||
|
|
||||||
router.navigate("/verification");
|
// router.navigate("/verification");
|
||||||
// router.navigate(`/(application)/(user)/profile/${id}`);
|
// router.navigate(`/(application)/(user)/profile/${id}`);
|
||||||
// router.navigate("/(application)/(user)/home");
|
router.navigate("/(application)/(user)/home");
|
||||||
// router.navigate(`/(application)/profile/${id}/edit`);
|
// router.navigate(`/(application)/profile/${id}/edit`);
|
||||||
// router.navigate(`/(application)/(user)/portofolio/${id}`)
|
// router.navigate(`/(application)/(user)/portofolio/${id}`)
|
||||||
// router.navigate(`/(application)/(image)/preview-image/${id}`);
|
// router.navigate(`/(application)/(image)/preview-image/${id}`);
|
||||||
|
// router.replace("/(application)/(user)/event/(tabs)");
|
||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
|||||||
Reference in New Issue
Block a user