feature & fix

deskripsi:
- perubahan komponen drawer
- penambahan list page drawer portofolio
- new file portofolio: edit, edit logo, edit sosmed
- new file maps: edit, custom-pin
#No Issue
This commit is contained in:
2025-07-10 10:27:30 +08:00
parent ee7efaef6a
commit 71ea0ca5f2
13 changed files with 183 additions and 68 deletions

View File

@@ -32,7 +32,7 @@ export default function UserLayout() {
}}
/>
{/* Profile */}
{/* ========== Profile Section ========= */}
<Stack.Screen
name="profile"
options={{
@@ -40,15 +40,15 @@ export default function UserLayout() {
}}
/>
{/* Portofolio */}
{/* ========== Portofolio Section ========= */}
<Stack.Screen
name="portofolio"
options={{
headerShown: false,
}}
/>
{/* User Search */}
{/* ========== User Search Section ========= */}
<Stack.Screen
name="user-search/index"
options={{
@@ -57,7 +57,7 @@ export default function UserLayout() {
}}
/>
{/* Notification */}
{/* ========== Notification Section ========= */}
<Stack.Screen
name="notifications/index"
options={{
@@ -66,7 +66,7 @@ export default function UserLayout() {
}}
/>
{/* Event */}
{/* ========== Event Section ========= */}
<Stack.Screen
name="event/(tabs)"
options={{
@@ -85,7 +85,7 @@ export default function UserLayout() {
}}
/>
{/* Forum */}
{/* ========== Forum Section ========= */}
<Stack.Screen
name="forum/index"
options={{
@@ -94,7 +94,7 @@ export default function UserLayout() {
}}
/>
{/* Maps */}
{/* ========== Maps Section ========= */}
<Stack.Screen
name="maps/index"
options={{
@@ -109,8 +109,22 @@ export default function UserLayout() {
headerLeft: () => <BackButton />,
}}
/>
<Stack.Screen
name="maps/[id]/edit"
options={{
title: "Edit Maps",
headerLeft: () => <BackButton />,
}}
/>
<Stack.Screen
name="maps/[id]/custom-pin"
options={{
title: "Custom Pin Maps",
headerLeft: () => <BackButton />,
}}
/>
{/* Marketplace */}
{/* ========== Marketplace Section ========= */}
<Stack.Screen
name="marketplace/index"
options={{

View File

@@ -0,0 +1,11 @@
import { TextCustom, ViewWrapper } from "@/components";
export default function MapsCustomPin() {
return (
<>
<ViewWrapper>
<TextCustom>Maps Custom Pin</TextCustom>
</ViewWrapper>
</>
);
}

View File

@@ -0,0 +1,11 @@
import { TextCustom, ViewWrapper } from "@/components";
export default function MapsEdit() {
return (
<>
<ViewWrapper>
<TextCustom>Maps Edit</TextCustom>
</ViewWrapper>
</>
);
}

View File

@@ -0,0 +1,11 @@
import { TextCustom, ViewWrapper } from "@/components";
export default function PortofolioEditLogo() {
return (
<>
<ViewWrapper>
<TextCustom>Portofolio Edit Logo</TextCustom>
</ViewWrapper>
</>
);
}

View File

@@ -0,0 +1,11 @@
import { TextCustom, ViewWrapper } from "@/components";
export default function PortofolioEditSocialMedia() {
return (
<>
<ViewWrapper>
<TextCustom>Portofolio Edit Social Media</TextCustom>
</ViewWrapper>
</>
);
}

View File

@@ -0,0 +1,11 @@
import { TextCustom, ViewWrapper } from "@/components";
export default function PortofolioEdit() {
return (
<>
<ViewWrapper>
<TextCustom>Portofolio Edit</TextCustom>
</ViewWrapper>
</>
);
}

View File

@@ -1,47 +1,26 @@
import { DrawerCustom, TextCustom } from "@/components";
import { DrawerCustom } from "@/components";
import LeftButtonCustom from "@/components/Button/BackButton";
import { IMenuDrawerItem } from "@/components/_Interface/types";
import ViewWrapper from "@/components/_ShareComponent/ViewWrapper";
import { MainColor } from "@/constants/color-palet";
import { DRAWER_HEIGHT } from "@/constants/constans-value";
import { drawerItems } from "@/screens/Profile/ListPage";
import Profile_MenuDrawerSection from "@/screens/Profile/MenuDrawerSection";
import { drawerItemsPortofolio } from "@/screens/Portofolio/ListPage";
import Portofolio_MenuDrawerSection from "@/screens/Portofolio/MenuDrawer";
import { GStyles } from "@/styles/global-styles";
import { Ionicons } from "@expo/vector-icons";
import { Stack, useLocalSearchParams } from "expo-router";
import { useRef, useState } from "react";
import { useState } from "react";
import {
Animated,
InteractionManager,
Text,
TouchableOpacity,
TouchableOpacity
} from "react-native";
export default function Portofolio() {
const { id } = useLocalSearchParams();
const [isDrawerOpen, setIsDrawerOpen] = useState(false);
const [showLogoutAlert, setShowLogoutAlert] = useState(false);
const drawerAnim = useRef(new Animated.Value(DRAWER_HEIGHT)).current;
const openDrawer = () => {
setIsDrawerOpen(true);
Animated.timing(drawerAnim, {
toValue: 0,
duration: 300,
useNativeDriver: true,
}).start();
};
const closeDrawer = () => {
Animated.timing(drawerAnim, {
toValue: DRAWER_HEIGHT, // sesuaikan dengan tinggi drawer Anda
duration: 300,
useNativeDriver: true,
}).start(() => {
InteractionManager.runAfterInteractions(() => {
setIsDrawerOpen(false); // baru ganti state setelah animasi selesai
});
});
setIsDrawerOpen(false);
};
return (
@@ -72,12 +51,10 @@ export default function Portofolio() {
<DrawerCustom
isVisible={isDrawerOpen}
closeDrawer={closeDrawer}
drawerAnim={drawerAnim}
height={350}
>
<Profile_MenuDrawerSection
drawerItems={drawerItems({ id: id as string })}
setShowLogoutAlert={setShowLogoutAlert}
<Portofolio_MenuDrawerSection
drawerItems={drawerItemsPortofolio({ id: id as string })}
setIsDrawerOpen={setIsDrawerOpen}
/>
</DrawerCustom>

View File

@@ -20,6 +20,12 @@ export default function PortofolioLayout() {
name="[id]/list"
options={{ title: "Daftar Portofolio" }}
/>
<Stack.Screen name="[id]/edit" options={{ title: "Edit Portofolio" }} />
<Stack.Screen name="[id]/edit-logo" options={{ title: "Edit Logo " }} />
<Stack.Screen
name="[id]/edit-social-media"
options={{ title: "Edit Social Media" }}
/>
</Stack>
</>
);

View File

@@ -3,43 +3,26 @@ import AlertCustom from "@/components/Alert/AlertCustom";
import LeftButtonCustom from "@/components/Button/BackButton";
import DrawerCustom from "@/components/Drawer/DrawerCustom";
import { MainColor } from "@/constants/color-palet";
import { DRAWER_HEIGHT } from "@/constants/constans-value";
import { drawerItems } from "@/screens/Profile/ListPage";
import { drawerItemsProfile } from "@/screens/Profile/ListPage";
import Profile_MenuDrawerSection from "@/screens/Profile/MenuDrawerSection";
import ProfilSection from "@/screens/Profile/ProfilSection";
import { GStyles } from "@/styles/global-styles";
import { Ionicons } from "@expo/vector-icons";
import { router, Stack, useLocalSearchParams } from "expo-router";
import React, { useRef, useState } from "react";
import { Animated, InteractionManager, TouchableOpacity } from "react-native";
import React, { useState } from "react";
import { TouchableOpacity } from "react-native";
export default function Profile() {
const { id } = useLocalSearchParams();
const [isDrawerOpen, setIsDrawerOpen] = useState(false);
const [showLogoutAlert, setShowLogoutAlert] = useState(false);
// Animasi menggunakan translateY (lebih kompatibel)
const drawerAnim = useRef(new Animated.Value(DRAWER_HEIGHT)).current; // mulai di luar bawah layar
const openDrawer = () => {
setIsDrawerOpen(true);
Animated.timing(drawerAnim, {
toValue: 0,
duration: 300,
useNativeDriver: true,
}).start();
};
const closeDrawer = () => {
Animated.timing(drawerAnim, {
toValue: DRAWER_HEIGHT, // sesuaikan dengan tinggi drawer Anda
duration: 300,
useNativeDriver: true,
}).start(() => {
InteractionManager.runAfterInteractions(() => {
setIsDrawerOpen(false); // baru ganti state setelah animasi selesai
});
});
setIsDrawerOpen(false);
};
const handleLogout = () => {
@@ -76,11 +59,10 @@ export default function Profile() {
<DrawerCustom
height={350}
isVisible={isDrawerOpen}
drawerAnim={drawerAnim}
closeDrawer={closeDrawer}
>
<Profile_MenuDrawerSection
drawerItems={drawerItems({ id: id as string })}
drawerItems={drawerItemsProfile({ id: id as string })}
setShowLogoutAlert={setShowLogoutAlert}
setIsDrawerOpen={setIsDrawerOpen}
/>