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:
33
screens/Portofolio/ListPage.tsx
Normal file
33
screens/Portofolio/ListPage.tsx
Normal file
@@ -0,0 +1,33 @@
|
||||
import { IMenuDrawerItem } from "@/components/_Interface/types";
|
||||
|
||||
export const drawerItemsPortofolio = ({
|
||||
id,
|
||||
}: {
|
||||
id: string;
|
||||
}): IMenuDrawerItem[] => [
|
||||
{
|
||||
icon: "create",
|
||||
label: "Edit portofolio",
|
||||
path: `/(application)/portofolio/${id}/edit`,
|
||||
},
|
||||
{
|
||||
icon: "camera",
|
||||
label: "Edit logo ",
|
||||
path: `/(application)/portofolio/${id}/edit-logo`,
|
||||
},
|
||||
{
|
||||
icon: "image",
|
||||
label: "Edit social media ",
|
||||
path: `/(application)/portofolio/${id}/edit-social-media`,
|
||||
},
|
||||
{
|
||||
icon: "add-circle",
|
||||
label: "Edit Map",
|
||||
path: `/(application)/maps/${id}/edit`,
|
||||
},
|
||||
{
|
||||
icon: "create-outline",
|
||||
label: "Custom Pin Map",
|
||||
path: `/(application)/maps/${id}/custom-pin`,
|
||||
},
|
||||
];
|
||||
28
screens/Portofolio/MenuDrawer.tsx
Normal file
28
screens/Portofolio/MenuDrawer.tsx
Normal file
@@ -0,0 +1,28 @@
|
||||
import { IMenuDrawerItem } from "@/components/_Interface/types";
|
||||
import MenuDrawerDynamicGrid from "@/components/Drawer/MenuDrawerDynamicGird";
|
||||
import { router } from "expo-router";
|
||||
|
||||
export default function Portofolio_MenuDrawerSection({
|
||||
drawerItems,
|
||||
setIsDrawerOpen,
|
||||
}: {
|
||||
drawerItems: IMenuDrawerItem[];
|
||||
setIsDrawerOpen: (value: boolean) => void;
|
||||
}) {
|
||||
const handlePress = (item: IMenuDrawerItem) => {
|
||||
console.log("PATH >> ", item.path);
|
||||
router.push(item.path as any);
|
||||
setIsDrawerOpen(false);
|
||||
};
|
||||
|
||||
return (
|
||||
<>
|
||||
{/* Menu Items */}
|
||||
<MenuDrawerDynamicGrid
|
||||
data={drawerItems}
|
||||
columns={4} // Ubah ke 2 jika ingin 2 kolom per baris
|
||||
onPressItem={handlePress}
|
||||
/>
|
||||
</>
|
||||
);
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
import { IMenuDrawerItem } from "@/components/_Interface/types";
|
||||
|
||||
export const drawerItems = ({ id }: { id: string }): IMenuDrawerItem[] => [
|
||||
export const drawerItemsProfile = ({ id }: { id: string }): IMenuDrawerItem[] => [
|
||||
{
|
||||
icon: "create",
|
||||
label: "Edit profile",
|
||||
|
||||
Reference in New Issue
Block a user