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:
@@ -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