diff --git a/packages/webapp/src/components/ui/input/TagsInput.tsx b/packages/webapp/src/components/ui/input/TagsInput.tsx index 71c0f6a178..910af18014 100644 --- a/packages/webapp/src/components/ui/input/TagsInput.tsx +++ b/packages/webapp/src/components/ui/input/TagsInput.tsx @@ -27,20 +27,9 @@ const TagsInput = forwardRef(function TagsInpu }, [defaultValue]); const [enteredValue, setEnteredValue] = useState(''); - const [isInputFocused, setIsInputFocused] = useState(false); const [error, setError] = useState(''); const [selectedScopes, addToScopesSet, removeFromSelectedSet] = useSet(); - function handleInputFocus() { - setIsInputFocused(true); - } - - function handleInputBlur() { - setTimeout(() => { - setIsInputFocused(false); - }, 100); - } - const [scopes, setScopes] = useState(selectedScopes); useEffect(() => { @@ -106,19 +95,17 @@ const TagsInput = forwardRef(function TagsInpu value={enteredValue} onChange={(e) => setEnteredValue(e.currentTarget.value)} onKeyDown={handleEnter} - onFocus={handleInputFocus} - onBlur={handleInputBlur} - placeholder={`${scopes.length ? '' : 'Find the list of scopes in the documentation of the external API provider.'}`} + placeholder={`${Boolean(scopes.length) ? '' : 'Find the list of scopes in the documentation of the external API provider.'}`} className="border-border-gray bg-active-gray text-white focus:border-white focus:ring-white block w-full appearance-none rounded-md border px-3 py-0.5 text-sm placeholder-gray-400 shadow-sm focus:outline-none" /> {error &&

{error}

} - {enteredValue !== '' && isInputFocused && ( + {enteredValue !== '' && (
- + Add new scope: "{enteredValue}"
)} diff --git a/packages/webapp/src/pages/Integration/FlowPage.tsx b/packages/webapp/src/pages/Integration/FlowPage.tsx index fcaf4868a2..7cc1d2db38 100644 --- a/packages/webapp/src/pages/Integration/FlowPage.tsx +++ b/packages/webapp/src/pages/Integration/FlowPage.tsx @@ -76,6 +76,7 @@ export default function FlowPage(props: FlowPageProps) { if (response.status !== 200) { const error = await response.json(); + setIsDownloading(false); toast.error(error.error, { position: toast.POSITION.BOTTOM_CENTER }); @@ -89,8 +90,9 @@ export default function FlowPage(props: FlowPageProps) { const blob = await response.blob(); const url = window.URL.createObjectURL(blob); const link = document.createElement('a'); + const timestamp = Math.floor(new Date().getTime() / 1000).toString(); link.href = url; - link.download = 'nango-integrations.zip'; + link.download = `nango-integrations-${timestamp}.zip`; document.body.appendChild(link); link.click(); document.body.removeChild(link);