From 91b21e0f791339fe5285313e50324d61f2fbccc5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9s=20De=20Freitas?= <6485562+adefreitas@users.noreply.github.com> Date: Tue, 12 Aug 2025 11:46:08 +0100 Subject: [PATCH] fix: oauth flow button state --- package-lock.json | 8 ++++---- package.json | 4 ++-- src/modules/integration-picker/IntegrationPicker.tsx | 1 + src/modules/integration-picker/components/cardFooter.tsx | 8 ++++++-- 4 files changed, 13 insertions(+), 8 deletions(-) diff --git a/package-lock.json b/package-lock.json index 7e2eb72..82380ea 100644 --- a/package-lock.json +++ b/package-lock.json @@ -10,7 +10,7 @@ "license": "MIT", "dependencies": { "@stackone/expressions": "^0.16.0", - "@stackone/malachite": "^0.3.1", + "@stackone/malachite": "^0.3.2", "@tanstack/react-query": "^5.77.2" }, "devDependencies": { @@ -1192,9 +1192,9 @@ } }, "node_modules/@stackone/malachite": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/@stackone/malachite/-/malachite-0.3.1.tgz", - "integrity": "sha512-mRmPTUxAMBP++EjfTJjBeTocDxvSfP/1YDOtYTmhjzhMu7inL6p34x2Va7JWFMZlwVeiQccBtHBXyQd70VHO3g==", + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/@stackone/malachite/-/malachite-0.3.2.tgz", + "integrity": "sha512-jdNaq8d+G5bpCRCyaeL7CAR084jUzSlEkIdqCS9zMCfDXMYSNGmltCfKxXM2jqxLSp//RG+96uPGfn1beUGeTA==", "dependencies": { "marked-react": "^3.0.0" }, diff --git a/package.json b/package.json index f23cae3..e1c766f 100644 --- a/package.json +++ b/package.json @@ -17,7 +17,7 @@ "license": "MIT", "dependencies": { "@stackone/expressions": "^0.16.0", - "@stackone/malachite": "^0.3.1", + "@stackone/malachite": "^0.3.2", "@tanstack/react-query": "^5.77.2" }, "peerDependencies": { @@ -45,4 +45,4 @@ "tslib": "^2.8.1", "typescript": "^5.8.3" } -} \ No newline at end of file +} diff --git a/src/modules/integration-picker/IntegrationPicker.tsx b/src/modules/integration-picker/IntegrationPicker.tsx index 7ccc590..f37c1f5 100644 --- a/src/modules/integration-picker/IntegrationPicker.tsx +++ b/src/modules/integration-picker/IntegrationPicker.tsx @@ -61,6 +61,7 @@ export const IntegrationPicker: React.FC = ({ footer={ setSelectedIntegration(null)} onNext={handleConnect} /> diff --git a/src/modules/integration-picker/components/cardFooter.tsx b/src/modules/integration-picker/components/cardFooter.tsx index 9cbae92..f4adfe9 100644 --- a/src/modules/integration-picker/components/cardFooter.tsx +++ b/src/modules/integration-picker/components/cardFooter.tsx @@ -13,6 +13,7 @@ import { Integration } from '../types'; interface CardFooterProps { selectedIntegration: Integration | null; fullWidth?: boolean; + isLoading?: boolean; onBack?: () => void; onNext: () => void; } @@ -20,11 +21,14 @@ interface CardFooterProps { const CardFooter: React.FC = ({ fullWidth = true, selectedIntegration, + isLoading, onBack, onNext, }) => { const buttons = useMemo(() => { - if (!selectedIntegration) return []; + if (!selectedIntegration || isLoading) { + return []; + } const buttons: Array<{ label: string; @@ -53,7 +57,7 @@ const CardFooter: React.FC = ({ }); return buttons; - }, [selectedIntegration, onBack, onNext]); + }, [selectedIntegration, onBack, onNext, isLoading]); if (buttons.length === 0) { return ;