mirror of
https://github.com/naturalcrit/homebrewery.git
synced 2026-11-23 20:56:54 +00:00
Fix for modals
This commit is contained in:
1 parent
8685c5cae4
commit
f3b01bc75c
1 file changed
+3
-3
@@ -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);
|
||||
|
||||
Reference in new issue
Block a user