Reset state on dialog close in ErrorDialog component
This commit is contained in:
@@ -92,7 +92,10 @@ interface ErrorDialogProps {
|
|||||||
|
|
||||||
function ErrorDialog({error, onReset, open}: ErrorDialogProps) {
|
function ErrorDialog({error, onReset, open}: ErrorDialogProps) {
|
||||||
return (
|
return (
|
||||||
<Dialog open={open} onOpenChange={() => {
|
<Dialog open={open} onOpenChange={(isOpen) => {
|
||||||
|
if (!isOpen) {
|
||||||
|
onReset();
|
||||||
|
}
|
||||||
}}>
|
}}>
|
||||||
<DialogContent className="sm:max-w-md">
|
<DialogContent className="sm:max-w-md">
|
||||||
<DialogHeader>
|
<DialogHeader>
|
||||||
|
|||||||
Reference in New Issue
Block a user