Event: Add history detail Fix : - nama variabel pada [id]/ Component Fix: - Spacing : tipe data num | str - ScrollView : tambah background # No Issue "
52 lines
1.4 KiB
TypeScript
52 lines
1.4 KiB
TypeScript
import {
|
|
DotButton,
|
|
DrawerCustom,
|
|
MenuDrawerDynamicGrid,
|
|
ViewWrapper,
|
|
Spacing,
|
|
} from "@/components";
|
|
import { IMenuDrawerItem } from "@/components/_Interface/types";
|
|
import LeftButtonCustom from "@/components/Button/BackButton";
|
|
import Event_BoxDetailPublishSection from "@/screens/Event/BoxDetailPublishSection";
|
|
import { menuDrawerPublishEvent } from "@/screens/Event/menuDrawerPublish";
|
|
import { router, Stack, useLocalSearchParams } from "expo-router";
|
|
import { useState } from "react";
|
|
|
|
export default function EventDetailHistory() {
|
|
const { id } = useLocalSearchParams();
|
|
const [openDrawer, setOpenDrawer] = useState(false);
|
|
|
|
const handlePress = (item: IMenuDrawerItem) => {
|
|
console.log("PATH ", item.path);
|
|
router.navigate(item.path as any);
|
|
setOpenDrawer(false);
|
|
};
|
|
|
|
return (
|
|
<>
|
|
<Stack.Screen
|
|
options={{
|
|
title: `Detail riwayat`,
|
|
headerLeft: () => <LeftButtonCustom />,
|
|
headerRight: () => <DotButton onPress={() => setOpenDrawer(true)} />,
|
|
}}
|
|
/>
|
|
<ViewWrapper>
|
|
<Event_BoxDetailPublishSection />
|
|
<Spacing />
|
|
</ViewWrapper>
|
|
<DrawerCustom
|
|
isVisible={openDrawer}
|
|
closeDrawer={() => setOpenDrawer(false)}
|
|
height={250}
|
|
>
|
|
<MenuDrawerDynamicGrid
|
|
data={menuDrawerPublishEvent({ id: id as string })}
|
|
columns={4}
|
|
onPressItem={handlePress}
|
|
/>
|
|
</DrawerCustom>
|
|
</>
|
|
);
|
|
}
|