0
0
mirror of https://github.com/naturalcrit/homebrewery.git synced 2026-01-08 07:32:40 +00:00

second commit

This commit is contained in:
Víctor Losada Hernández
2025-11-09 12:28:38 +01:00
parent 142fb8376f
commit 164330a4ef
4 changed files with 108 additions and 43 deletions

View File

@@ -2,7 +2,7 @@
import React from 'react';
const { useRef, useEffect } = React;
function Dialog({ dismisskeys = [], closeText = 'Close', blocking = false, ...rest }) {
function Dialog({ dismisskeys = [], closeText = 'Close', blocking = false, callbackFn = ()=>{}, ...rest }) {
const dialogRef = useRef(null);
useEffect(()=>{
@@ -15,6 +15,7 @@ function Dialog({ dismisskeys = [], closeText = 'Close', blocking = false, ...re
localStorage.setItem(key, 'true');
}
});
callbackFn();
dialogRef.current?.close();
};