mirror of
https://github.com/ansible/awx.git
synced 2026-04-14 06:29:25 -02:30
add link back to dashboard from ContentError
This commit is contained in:
@@ -1,5 +1,6 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
import styled from 'styled-components';
|
import styled from 'styled-components';
|
||||||
|
import { Link } from 'react-router-dom';
|
||||||
import { bool, instanceOf } from 'prop-types';
|
import { bool, instanceOf } from 'prop-types';
|
||||||
import { t } from '@lingui/macro';
|
import { t } from '@lingui/macro';
|
||||||
import { withI18n } from '@lingui/react';
|
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`The page you requested could not be found.`)
|
||||||
: i18n._(
|
: i18n._(
|
||||||
t`There was an error loading this content. Please reload the page.`
|
t`There was an error loading this content. Please reload the page.`
|
||||||
)}
|
)}{' '}
|
||||||
{children}
|
{children || <Link to="/home">{i18n._(t`Back to Dashboard.`)}</Link>}
|
||||||
</EmptyStateBody>
|
</EmptyStateBody>
|
||||||
{error && <ErrorDetail error={error} />}
|
{error && <ErrorDetail error={error} />}
|
||||||
</EmptyState>
|
</EmptyState>
|
||||||
|
|||||||
Reference in New Issue
Block a user