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) {
|
||||
return (
|
||||
<Dialog open={open} onOpenChange={() => {
|
||||
<Dialog open={open} onOpenChange={(isOpen) => {
|
||||
if (!isOpen) {
|
||||
onReset();
|
||||
}
|
||||
}}>
|
||||
<DialogContent className="sm:max-w-md">
|
||||
<DialogHeader>
|
||||
|
||||
Reference in New Issue
Block a user