From 70e832d4db7e82627b453cf308843a014652616f Mon Sep 17 00:00:00 2001 From: nixocio Date: Thu, 9 Dec 2021 15:46:43 -0500 Subject: [PATCH] Fix extra requests when creating WorkFlowJobTemplate Fix extra requests when creating WorkFlowJobTemplate See: https://github.com/ansible/awx/issues/11442 --- awx/ui/src/components/AppendBody/AppendBody.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/awx/ui/src/components/AppendBody/AppendBody.js b/awx/ui/src/components/AppendBody/AppendBody.js index f7317187b1..9f3ca64d06 100644 --- a/awx/ui/src/components/AppendBody/AppendBody.js +++ b/awx/ui/src/components/AppendBody/AppendBody.js @@ -1,8 +1,8 @@ -import { useEffect } from 'react'; +import { useEffect, useState } from 'react'; import ReactDOM from 'react-dom'; function AppendBody({ children }) { - const el = document.createElement('div'); + const [el] = useState(document.createElement('div')); useEffect(() => { document.body.appendChild(el);