From 496862592a98e4b1346fb4036e02276a5cee09e9 Mon Sep 17 00:00:00 2001 From: Alex Corey Date: Thu, 16 Jul 2020 12:59:27 -0400 Subject: [PATCH] fixes erroneous render --- .../screens/Template/Survey/SurveyList.jsx | 27 ++++++++++--------- 1 file changed, 14 insertions(+), 13 deletions(-) diff --git a/awx/ui_next/src/screens/Template/Survey/SurveyList.jsx b/awx/ui_next/src/screens/Template/Survey/SurveyList.jsx index a28e6c813c..dd06e0bca9 100644 --- a/awx/ui_next/src/screens/Template/Survey/SurveyList.jsx +++ b/awx/ui_next/src/screens/Template/Survey/SurveyList.jsx @@ -167,21 +167,22 @@ function SurveyList({ ); } - + if (!questions || questions?.length <= 0) { + return ( + + + + {i18n._(t`No survey questions found.`)} + + + {i18n._(t`Please add survey questions.`)} + + + + ); + } return ( <> - {(!questions || questions?.length <= 0) && ( - - - - {i18n._(t`No survey questions found.`)} - - - {i18n._(t`Please add survey questions.`)} - - - - )}