diff --git a/frontend/app/components/Errors/Error/ErrorInfo.js b/frontend/app/components/Errors/Error/ErrorInfo.js
index b1d18ab45..8407826de 100644
--- a/frontend/app/components/Errors/Error/ErrorInfo.js
+++ b/frontend/app/components/Errors/Error/ErrorInfo.js
@@ -2,82 +2,77 @@ import React from 'react';
import { connect } from 'react-redux';
import withSiteIdRouter from 'HOCs/withSiteIdRouter';
import { errors as errorsRoute, error as errorRoute } from 'App/routes';
-import { NoContent , Loader, IconButton, Icon, Popup, BackLink, } from 'UI';
+import { NoContent, Loader, IconButton, Icon, Popup, BackLink } from 'UI';
import { fetch, fetchTrace } from 'Duck/errors';
import MainSection from './MainSection';
import SideSection from './SideSection';
import AnimatedSVG, { ICONS } from 'Shared/AnimatedSVG/AnimatedSVG';
-@connect(state =>({
- errorIdInStore: state.getIn(["errors", "instance"]).errorId,
- loading: state.getIn([ "errors", "fetch", "loading" ]) || state.getIn([ "errors", "fetchTrace", "loading" ]),
- errorOnFetch: state.getIn(["errors", "fetch", "errors"]) || state.getIn([ "errors", "fetchTrace", "errors" ]),
-}), {
- fetch,
- fetchTrace,
-})
+@connect(
+ (state) => ({
+ errorIdInStore: state.getIn(['errors', 'instance']).errorId,
+ loading: state.getIn(['errors', 'fetch', 'loading']) || state.getIn(['errors', 'fetchTrace', 'loading']),
+ errorOnFetch: state.getIn(['errors', 'fetch', 'errors']) || state.getIn(['errors', 'fetchTrace', 'errors']),
+ }),
+ {
+ fetch,
+ fetchTrace,
+ }
+)
@withSiteIdRouter
export default class ErrorInfo extends React.PureComponent {
- ensureInstance() {
- const { errorId, loading, errorOnFetch } = this.props;
- if (!loading &&
- this.props.errorIdInStore !== errorId &&
- errorId != null) {
- this.props.fetch(errorId);
- this.props.fetchTrace(errorId)
- }
- }
- componentDidMount() {
- this.ensureInstance();
- }
- componentDidUpdate() {
- this.ensureInstance();
- }
- next = () => {
- const { list, errorId } = this.props;
- const curIndex = list.findIndex(e => e.errorId === errorId);
- const next = list.get(curIndex + 1);
- if (next != null) {
- this.props.history.push(errorRoute(next.errorId))
- }
- }
- prev = () => {
- const { list, errorId } = this.props;
- const curIndex = list.findIndex(e => e.errorId === errorId);
- const prev = list.get(curIndex - 1);
- if (prev != null) {
- this.props.history.push(errorRoute(prev.errorId))
- }
-
- }
- render() {
- const {
- loading,
- errorIdInStore,
- list,
- errorId,
- } = this.props;
+ ensureInstance() {
+ const { errorId, loading, errorOnFetch } = this.props;
+ if (!loading && this.props.errorIdInStore !== errorId && errorId != null) {
+ this.props.fetch(errorId);
+ this.props.fetchTrace(errorId);
+ }
+ }
+ componentDidMount() {
+ this.ensureInstance();
+ }
+ componentDidUpdate() {
+ this.ensureInstance();
+ }
+ next = () => {
+ const { list, errorId } = this.props;
+ const curIndex = list.findIndex((e) => e.errorId === errorId);
+ const next = list.get(curIndex + 1);
+ if (next != null) {
+ this.props.history.push(errorRoute(next.errorId));
+ }
+ };
+ prev = () => {
+ const { list, errorId } = this.props;
+ const curIndex = list.findIndex((e) => e.errorId === errorId);
+ const prev = list.get(curIndex - 1);
+ if (prev != null) {
+ this.props.history.push(errorRoute(prev.errorId));
+ }
+ };
+ render() {
+ const { loading, errorIdInStore, list, errorId } = this.props;
- let nextDisabled = true,
- prevDisabled = true;
- if (list.size > 0) {
- nextDisabled = loading || list.last().errorId === errorId;
- prevDisabled = loading || list.first().errorId === errorId;
- }
+ let nextDisabled = true,
+ prevDisabled = true;
+ if (list.size > 0) {
+ nextDisabled = loading || list.last().errorId === errorId;
+ prevDisabled = loading || list.first().errorId === errorId;
+ }
- return (
-
{value}
+