Refactor CTA_TipologiaModal: update Dialog onOpenChange handler for better async handling
This commit is contained in:
parent
f7553e827d
commit
fd22901c45
1 changed files with 9 additions and 1 deletions
|
|
@ -45,7 +45,15 @@ export const CTA_TipologiaModal = () => {
|
|||
}, [path, hasCookie]);
|
||||
|
||||
return (
|
||||
<Dialog open={open} onOpenChange={setOpen}>
|
||||
<Dialog
|
||||
open={open}
|
||||
onOpenChange={async (v) => {
|
||||
setOpen(v);
|
||||
if (!v) {
|
||||
await update(null);
|
||||
}
|
||||
}}
|
||||
>
|
||||
<DialogTrigger asChild>
|
||||
<Button variant="info" className="flex items-center gap-2">
|
||||
<CircleHelp />{" "}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue