0
0
mirror of https://github.com/naturalcrit/homebrewery.git synced 2025-12-24 20:42:43 +00:00

Fix for modals

This commit is contained in:
G.Ambatte
2024-06-04 16:51:43 +12:00
parent 8685c5cae4
commit f3b01bc75c

View File

@@ -15,12 +15,12 @@ function Modal({ dismissKey, blocking, children, ...rest }) {
}, []);
useEffect(()=>{
if(blocking) {
modal ? ref.current?.showModal() : ref.current?.show();
if(open) {
blocking ? ref.current?.showModal() : ref.current?.show();
} else {
ref.current?.close();
}
}, [blocking]);
}, [open]);
const dismiss = function(){
localStorage.setItem(dismissKey, true);