From d8fa06fc363276ae2a774d1601e5b73d4d06a22e Mon Sep 17 00:00:00 2001 From: Antoine Detailleur <detailleur@fortiss.org> Date: Wed, 28 Apr 2021 16:18:16 +0200 Subject: [PATCH] [NRRPLT-8136] details in Modal.Body, Details title deleted --- src/components/dialog/error-dialog.js | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/src/components/dialog/error-dialog.js b/src/components/dialog/error-dialog.js index 7596e2b..bc1d130 100644 --- a/src/components/dialog/error-dialog.js +++ b/src/components/dialog/error-dialog.js @@ -54,17 +54,7 @@ class ErrorDialog extends React.Component{ <h4>{error.type}</h4> </Modal.Header> <Modal.Body> - <h5>Details</h5><pre>{error.message}</pre> - </Modal.Body> - <Modal.Footer> - <div> - <Button variant="warning" onClick={() => this.handleClose()}> - <span className="glyphicon glyphicon-remove"></span> Close - </Button> - <Button variant="light" onClick={() => this.sourceDisplay()}> - {this.state.isErrorSourceDisplayed ? 'Hide' : 'Show'} scary details <span></span> - </Button> - </div> + {error.message} {this.state.isErrorSourceDisplayed ? <div className="details"> {!error.code && !error.data && !error.stack @@ -82,6 +72,16 @@ class ErrorDialog extends React.Component{ </div> : null } + </Modal.Body> + <Modal.Footer> + <div> + <Button variant="warning" onClick={() => this.handleClose()}> + <span className="glyphicon glyphicon-remove"></span> Close + </Button> + <Button variant="light" onClick={() => this.sourceDisplay()}> + {this.state.isErrorSourceDisplayed ? 'Hide' : 'Show'} scary details <span></span> + </Button> + </div> </Modal.Footer> </Modal.Dialog> </div> -- GitLab