From f3645ab48792a9f52d69057fbb0bf84d3a0af53d Mon Sep 17 00:00:00 2001 From: Isha Date: Thu, 7 Nov 2024 13:04:04 +0530 Subject: [PATCH] Set iframe visiblity conditionally --- .../components/projects/create/Configure.tsx | 7 ++++-- .../src/components/projects/create/IFrame.tsx | 24 +++++++++---------- 2 files changed, 17 insertions(+), 14 deletions(-) diff --git a/packages/frontend/src/components/projects/create/Configure.tsx b/packages/frontend/src/components/projects/create/Configure.tsx index 85207d62..7729b5a5 100644 --- a/packages/frontend/src/components/projects/create/Configure.tsx +++ b/packages/frontend/src/components/projects/create/Configure.tsx @@ -38,14 +38,16 @@ type ConfigureFormValues = ConfigureDeploymentFormValues & const DEFAULT_MAX_PRICE = '10000'; const Configure = () => { - const { signClient, session, accounts } = useWalletConnectClient(); + const { signClient, session } = useWalletConnectClient(); const [isLoading, setIsLoading] = useState(false); const [deployers, setDeployers] = useState([]); const [selectedAccount, setSelectedAccount] = useState(); + const [accounts, setAccounts] = useState([]); const [selectedDeployer, setSelectedDeployer] = useState(); const [isPaymentLoading, setIsPaymentLoading] = useState(false); const [isPaymentDone, setIsPaymentDone] = useState(false); + const [isFrameVisible, setIsFrameVisible] = useState(false); const [searchParams] = useSearchParams(); const templateId = searchParams.get('templateId'); @@ -175,6 +177,7 @@ const Configure = () => { const handleFormSubmit = useCallback( async (createFormData: FieldValues) => { try { + setIsFrameVisible(true); const deployerLrn = createFormData.lrn; const deployer = deployers.find( (deployer) => deployer.deployerLrn === deployerLrn, @@ -534,7 +537,7 @@ const Configure = () => { ) : ( <> - );