diff --git a/packages/react-components/src/ConfigurationScreen.tsx b/packages/react-components/src/ConfigurationScreen.tsx index 1c9f75d..3456c45 100644 --- a/packages/react-components/src/ConfigurationScreen.tsx +++ b/packages/react-components/src/ConfigurationScreen.tsx @@ -57,7 +57,6 @@ const ConfigurationScreen: FC<{ theme: string }> = ({ theme }) => {

Configure your Flare Account

= ({ theme }) => { setApiKey={setApiKey} /> = ({ theme }) => { } /> void; -}> = ({ show, apiKey, configurationStep, onEditConfigurationClick }) => { +}> = ({ apiKey, configurationStep, onEditConfigurationClick }) => { + const [isInitializingData, setIsInitializingData] = useState(true); const [flareSearchUrl, setFlareSearchUrl] = useState(''); const [tenantName, setTenantName] = useState(''); @@ -28,13 +29,26 @@ const ConfigurationCompletedStep: FC<{ userTenants.find((tenant: Tenant) => tenant.id === tenantId)?.name || 'unknown' ); + setIsInitializingData(false); } ); + } else { + setIsInitializingData(true); + setFlareSearchUrl(''); + setTenantName(''); } }, [configurationStep, apiKey]); + if (configurationStep !== ConfigurationStep.Completed) { + return null; + } + + if (isInitializingData) { + return ; + } + return ( -