mirror of
https://gitlab.com/mbugroup/lti-web-client.git
synced 2026-05-20 21:41:57 +00:00
feat(FE-Storyless): update modal functionality to use show() method and clean up code
This commit is contained in:
@@ -16,7 +16,7 @@ export const useModal = () => {
|
||||
|
||||
const openModal = useCallback(() => {
|
||||
if (!ref.current) return;
|
||||
ref.current.showModal();
|
||||
ref.current.show();
|
||||
setOpen(true);
|
||||
}, []);
|
||||
|
||||
@@ -30,7 +30,6 @@ export const useModal = () => {
|
||||
open ? closeModal() : openModal();
|
||||
}, [open, closeModal, openModal]);
|
||||
|
||||
// Gunakan useEffect agar event listener tidak didaftarkan berulang kali
|
||||
useEffect(() => {
|
||||
const dialog = ref.current;
|
||||
if (!dialog) return;
|
||||
|
||||
Reference in New Issue
Block a user