From d4b2cacb3ed245789ec82647fe7aa7e5674fa4be Mon Sep 17 00:00:00 2001 From: mabashian Date: Tue, 10 Sep 2019 10:30:08 -0400 Subject: [PATCH] Don't render the 404 not found page until the content's finished loading --- awx/ui_next/src/screens/Job/Job.jsx | 20 +++++++++------- .../src/screens/Organization/Organization.jsx | 20 +++++++++------- awx/ui_next/src/screens/Template/Template.jsx | 24 ++++++++++--------- 3 files changed, 35 insertions(+), 29 deletions(-) diff --git a/awx/ui_next/src/screens/Job/Job.jsx b/awx/ui_next/src/screens/Job/Job.jsx index c3150ab15a..bf4e4761dc 100644 --- a/awx/ui_next/src/screens/Job/Job.jsx +++ b/awx/ui_next/src/screens/Job/Job.jsx @@ -149,15 +149,17 @@ class Job extends Component { ( - - - {i18n._(`View Job Details`)} - - - )} + render={() => + !hasContentLoading && ( + + + {i18n._(`View Job Details`)} + + + ) + } />, ]} diff --git a/awx/ui_next/src/screens/Organization/Organization.jsx b/awx/ui_next/src/screens/Organization/Organization.jsx index 69e08354dd..7ec0ce3785 100644 --- a/awx/ui_next/src/screens/Organization/Organization.jsx +++ b/awx/ui_next/src/screens/Organization/Organization.jsx @@ -238,15 +238,17 @@ class Organization extends Component { ( - - {match.params.id && ( - - {i18n._(`View Organization Details`)} - - )} - - )} + render={() => + !hasContentLoading && ( + + {match.params.id && ( + + {i18n._(`View Organization Details`)} + + )} + + ) + } /> , diff --git a/awx/ui_next/src/screens/Template/Template.jsx b/awx/ui_next/src/screens/Template/Template.jsx index 062ba9e0c3..8ac154072a 100644 --- a/awx/ui_next/src/screens/Template/Template.jsx +++ b/awx/ui_next/src/screens/Template/Template.jsx @@ -119,17 +119,19 @@ class Template extends Component { ( - - {match.params.id && ( - - {i18n._(`View Template Details`)} - - )} - - )} + render={() => + !hasContentLoading && ( + + {match.params.id && ( + + {i18n._(`View Template Details`)} + + )} + + ) + } />, ]}