upd: pengumuman

Deskripsi:
- mengganti layout navbar terbaru
- mengganti global state menjadi local state
- memakai modal konfirmasi

NO Issues
This commit is contained in:
amel
2024-07-08 16:33:39 +08:00
parent 82211071e1
commit f91dcc32de
8 changed files with 197 additions and 149 deletions

View File

@@ -1,33 +1,22 @@
'use client'
import { isDrawer, LayoutDrawer, LayoutIconBack, LayoutNavbarHome, WARNA } from "@/module/_global";
import { useHookstate } from "@hookstate/core";
import { ActionIcon, Box, Grid, Group, Text } from "@mantine/core";
import { LayoutDrawer, LayoutNavbarNew, WARNA } from "@/module/_global";
import { ActionIcon, Box } from "@mantine/core";
import { HiMenu } from "react-icons/hi";
import DrawerDetailAnnouncement from "./drawer_detail_announcement";
import { useState } from "react";
export default function NavbarDetailAnnouncement() {
const openDrawer = useHookstate(isDrawer)
const [isOpenDrawer, setOpenDrawer] = useState(false)
return (
<Box>
<LayoutNavbarHome>
<Grid justify='center' align='center'>
<Grid.Col span="auto">
<LayoutIconBack />
</Grid.Col>
<Grid.Col span={6}>
<Text ta={'center'} fw={'bold'} c={'white'}>PENGUMUMAN</Text>
</Grid.Col>
<Grid.Col span="auto">
<Group justify='flex-end'>
<ActionIcon onClick={() => openDrawer.set(true)} variant="light" bg={WARNA.bgIcon} size="lg" radius="lg" aria-label="Settings">
<HiMenu size={20} color='white' />
</ActionIcon>
</Group>
</Grid.Col>
</Grid>
</LayoutNavbarHome>
<LayoutDrawer opened={openDrawer.get()} title={'MENU'} onClose={() => openDrawer.set(false)}>
<DrawerDetailAnnouncement />
<LayoutNavbarNew back="" title="Pengumuman"
menu={
<ActionIcon onClick={() => setOpenDrawer(true)} variant="light" bg={WARNA.bgIcon} size="lg" radius="lg" aria-label="Settings">
<HiMenu size={20} color='white' />
</ActionIcon>}
/>
<LayoutDrawer opened={isOpenDrawer} title={'MENU'} onClose={() => setOpenDrawer(false)}>
<DrawerDetailAnnouncement onDeleted={() => setOpenDrawer(false)} />
</LayoutDrawer>
</Box>
)