import { AlertDefaultSystem, BackButton, BaseBox, DotButton, DrawerCustom, DummyLandscapeImage, MenuDrawerDynamicGrid, StackCustom, TextCustom, ViewWrapper, } from "@/components"; import { IconEdit } from "@/components/_Icon"; import { IconTrash } from "@/components/_Icon/IconTrash"; import dayjs from "dayjs"; import { router, Stack, useLocalSearchParams } from "expo-router"; import { useState } from "react"; export default function DonationNews() { const { id, news } = useLocalSearchParams(); const [openDrawer, setOpenDrawer] = useState(false); return ( <> , headerRight: () => setOpenDrawer(true)} />, }} /> {dayjs().format("DD MMM YYYY")} Judul Berita Lorem ipsum dolor sit amet consectetur adipisicing elit. Sapiente est id temporibus perferendis eos reiciendis reprehenderit tempora ut quibusdam dolores facilis rerum exercitationem recusandae quis neque, adipisci dolorum, aspernatur labore? setOpenDrawer(false)} height={"auto"} > , label: "Edit Berita", path: `/donation/${id}/(news)/${news}/edit-news` as any, }, { icon: , label: "Hapus Berita", path: `` as any, color: "red", }, ]} onPressItem={(item) => { if ((item.path as any) === "") { setOpenDrawer(false); AlertDefaultSystem({ title: "Hapus Berita", message: "Apakah Anda yakin ingin menghapus berita ini?", textLeft: "Batal", textRight: "Hapus", onPressRight: () => { router.back(); }, }); } else { router.navigate(item.path as any); setOpenDrawer(false); } }} /> ); }