mirror of
https://github.com/ansible/awx.git
synced 2026-05-23 00:37:37 -02:30
Don't render the 404 not found page until the content's finished loading
This commit is contained in:
@@ -149,7 +149,8 @@ class Job extends Component {
|
||||
<Route
|
||||
key="not-found"
|
||||
path="*"
|
||||
render={() => (
|
||||
render={() =>
|
||||
!hasContentLoading && (
|
||||
<ContentError isNotFound>
|
||||
<Link
|
||||
to={`/jobs/${match.params.type}/${match.params.id}/details`}
|
||||
@@ -157,7 +158,8 @@ class Job extends Component {
|
||||
{i18n._(`View Job Details`)}
|
||||
</Link>
|
||||
</ContentError>
|
||||
)}
|
||||
)
|
||||
}
|
||||
/>,
|
||||
]}
|
||||
</Switch>
|
||||
|
||||
@@ -238,7 +238,8 @@ class Organization extends Component {
|
||||
<Route
|
||||
key="not-found"
|
||||
path="*"
|
||||
render={() => (
|
||||
render={() =>
|
||||
!hasContentLoading && (
|
||||
<ContentError isNotFound>
|
||||
{match.params.id && (
|
||||
<Link to={`/organizations/${match.params.id}/details`}>
|
||||
@@ -246,7 +247,8 @@ class Organization extends Component {
|
||||
</Link>
|
||||
)}
|
||||
</ContentError>
|
||||
)}
|
||||
)
|
||||
}
|
||||
/>
|
||||
,
|
||||
</Switch>
|
||||
|
||||
@@ -119,7 +119,8 @@ class Template extends Component {
|
||||
<Route
|
||||
key="not-found"
|
||||
path="*"
|
||||
render={() => (
|
||||
render={() =>
|
||||
!hasContentLoading && (
|
||||
<ContentError isNotFound>
|
||||
{match.params.id && (
|
||||
<Link
|
||||
@@ -129,7 +130,8 @@ class Template extends Component {
|
||||
</Link>
|
||||
)}
|
||||
</ContentError>
|
||||
)}
|
||||
)
|
||||
}
|
||||
/>,
|
||||
]}
|
||||
</Switch>
|
||||
|
||||
Reference in New Issue
Block a user