From e1636b3ad44babca52294ce264683644465d83b7 Mon Sep 17 00:00:00 2001 From: Keith Grant Date: Mon, 12 Aug 2019 12:18:35 -0700 Subject: [PATCH] add link back to dashboard from ContentError --- awx/ui_next/src/components/ContentError/ContentError.jsx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/awx/ui_next/src/components/ContentError/ContentError.jsx b/awx/ui_next/src/components/ContentError/ContentError.jsx index 7b0e6c8f75..a94adc4ac9 100644 --- a/awx/ui_next/src/components/ContentError/ContentError.jsx +++ b/awx/ui_next/src/components/ContentError/ContentError.jsx @@ -1,5 +1,6 @@ import React from 'react'; import styled from 'styled-components'; +import { Link } from 'react-router-dom'; import { bool, instanceOf } from 'prop-types'; import { t } from '@lingui/macro'; import { withI18n } from '@lingui/react'; @@ -42,8 +43,8 @@ function ContentError({ error, children, isNotFound, i18n }) { ? i18n._(t`The page you requested could not be found.`) : i18n._( t`There was an error loading this content. Please reload the page.` - )} - {children} + )}{' '} + {children || {i18n._(t`Back to Dashboard.`)}} {error && }