mirror of
https://github.com/naturalcrit/homebrewery.git
synced 2026-01-05 10:12:41 +00:00
Fix for modals
This commit is contained in:
@@ -15,12 +15,12 @@ function Modal({ dismissKey, blocking, children, ...rest }) {
|
|||||||
}, []);
|
}, []);
|
||||||
|
|
||||||
useEffect(()=>{
|
useEffect(()=>{
|
||||||
if(blocking) {
|
if(open) {
|
||||||
modal ? ref.current?.showModal() : ref.current?.show();
|
blocking ? ref.current?.showModal() : ref.current?.show();
|
||||||
} else {
|
} else {
|
||||||
ref.current?.close();
|
ref.current?.close();
|
||||||
}
|
}
|
||||||
}, [blocking]);
|
}, [open]);
|
||||||
|
|
||||||
const dismiss = function(){
|
const dismiss = function(){
|
||||||
localStorage.setItem(dismissKey, true);
|
localStorage.setItem(dismissKey, true);
|
||||||
|
|||||||
Reference in New Issue
Block a user