upd: hapus variable global

NO Issues
This commit is contained in:
amel
2024-07-09 10:57:26 +08:00
parent 0c62724feb
commit de1debf3db
16 changed files with 24 additions and 54 deletions

View File

@@ -5,8 +5,6 @@ import LoadingPage from "./layout/layout_loading_page";
import LayoutLogin from "./layout/layout_login";
import LayoutNavbarHome from "./layout/layout_navbar_home";
import LayoutNavbarNew from "./layout/layout_navbar_new";
import { isDrawer } from "./val/isDrawer";
import { isModal } from "./val/isModal";
export { WARNA }
export { LayoutLogin }
@@ -14,6 +12,4 @@ export { LayoutNavbarHome }
export { LayoutIconBack }
export { LoadingPage }
export { LayoutDrawer }
export { isDrawer }
export { isModal }
export { LayoutNavbarNew }

View File

@@ -1,11 +1,8 @@
import { useHookstate } from '@hookstate/core';
import { Box, Button, Flex, Modal, Text } from '@mantine/core';
import React, { useState } from 'react';
import { BsQuestionCircleFill } from 'react-icons/bs';
import { isModal } from '../val/isModal';
export default function LayoutModal({ opened, onClose, description, onYes }: { opened: boolean, onClose: () => void, description: string, onYes: (val: boolean) => void }) {
const openModal = useHookstate(isModal)
const [isValModal, setValModal] = useState(opened)
return (
<Modal styles={{

View File

@@ -1,4 +0,0 @@
'use client'
import { hookstate } from '@hookstate/core';
export const isDrawer = hookstate(false)

View File

@@ -1,4 +0,0 @@
'use client'
import { hookstate } from '@hookstate/core';
export const isModal = hookstate(false)