From 65510acdf3c2b9760cad8b08de4a85e628531d35 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Mierzwa?= Date: Tue, 8 Oct 2019 22:01:13 +0100 Subject: [PATCH] chore(ui): tweak internal error message css --- ui/src/ErrorBoundary.js | 32 +++++++++++++------ .../__snapshots__/ErrorBoundary.test.js.snap | 22 ++++++++++--- 2 files changed, 40 insertions(+), 14 deletions(-) diff --git a/ui/src/ErrorBoundary.js b/ui/src/ErrorBoundary.js index 242f73fc8..0b4e0d003 100644 --- a/ui/src/ErrorBoundary.js +++ b/ui/src/ErrorBoundary.js @@ -4,28 +4,41 @@ import PropTypes from "prop-types"; import * as Sentry from "@sentry/browser"; import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; -import { faExclamationCircle } from "@fortawesome/free-solid-svg-icons/faExclamationCircle"; +import { faBomb } from "@fortawesome/free-solid-svg-icons/faBomb"; -const InternalError = ({ message, secondsLeft }) => ( +const InternalError = ({ message, secondsLeft, progressLeft }) => (

- + Internal error

-

{message}

-

+

+ {message} +

+

This page will auto refresh in {secondsLeft}s + + +

); InternalError.propTypes = { message: PropTypes.node.isRequired, - secondsLeft: PropTypes.number.isRequired + secondsLeft: PropTypes.number.isRequired, + progressLeft: PropTypes.number.isRequired }; class ErrorBoundary extends Component { @@ -68,6 +81,7 @@ class ErrorBoundary extends Component { ); } diff --git a/ui/src/__snapshots__/ErrorBoundary.test.js.snap b/ui/src/__snapshots__/ErrorBoundary.test.js.snap index 9ad7d293f..7afcbb79a 100644 --- a/ui/src/__snapshots__/ErrorBoundary.test.js.snap +++ b/ui/src/__snapshots__/ErrorBoundary.test.js.snap @@ -8,14 +8,14 @@ exports[` matches snapshot 1`] = ` @@ -23,11 +23,23 @@ exports[` matches snapshot 1`] = ` Internal error -

+

Error: Error thrown from problem child

-

+

This page will auto refresh in 60s + + + +