mirror of
https://github.com/ansible/awx.git
synced 2026-01-11 10:00:01 -03:30
add link back to dashboard from ContentError
This commit is contained in:
parent
eeb86b3105
commit
e1636b3ad4
@ -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 || <Link to="/home">{i18n._(t`Back to Dashboard.`)}</Link>}
|
||||
</EmptyStateBody>
|
||||
{error && <ErrorDetail error={error} />}
|
||||
</EmptyState>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user