Skip to content

Commit

Permalink
Update ErrorDialog.tsx
Browse files Browse the repository at this point in the history
  • Loading branch information
bgwastu committed Jan 15, 2022
1 parent 0bbab11 commit cd0c9cf
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions client/src/components/ErrorDialog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,14 @@ interface Props {
function ErrorDialog(props: Props) {
return <Dialog
open={props.state.isError}
onClose={() => props.setState({...props.state, isError: false, errorMessage: ''})}
onClose={() => props.setState(
{
isLoading: false,
isFinished: false,
isError: false,
errorMessage: '',
}
)}
aria-labelledby="alert-dialog-title"
aria-describedby="alert-dialog-description"
>
Expand All @@ -24,7 +31,12 @@ function ErrorDialog(props: Props) {
</DialogContentText>
</DialogContent>
<DialogActions>
<Button onClick={() => props.setState({...props.state, isError: false, errorMessage: ''})}>Tutup</Button>
<Button onClick={() => props.setState({
isLoading: false,
isFinished: false,
isError: false,
errorMessage: '',
})}>Tutup</Button>
</DialogActions>
</Dialog>;
}
Expand Down

0 comments on commit cd0c9cf

Please sign in to comment.