From 18a44a3dab5a2102f3914859a923297e7dabdc12 Mon Sep 17 00:00:00 2001 From: Ondra Machacek Date: Thu, 7 Nov 2024 12:45:25 +0100 Subject: [PATCH] Fix the ssh key validation (#35) The component is referencing its own Props type. To fix this, wen need to define the DiscoverySourceSetupModalProps interface/type separately before the component. Signed-off-by: Ondra Machacek --- .../empty-state/DiscoverySourceSetupModal.tsx | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/apps/demo/src/migration-wizard/steps/connect/sources-table/empty-state/DiscoverySourceSetupModal.tsx b/apps/demo/src/migration-wizard/steps/connect/sources-table/empty-state/DiscoverySourceSetupModal.tsx index e8f4237..7ea4a75 100644 --- a/apps/demo/src/migration-wizard/steps/connect/sources-table/empty-state/DiscoverySourceSetupModal.tsx +++ b/apps/demo/src/migration-wizard/steps/connect/sources-table/empty-state/DiscoverySourceSetupModal.tsx @@ -40,8 +40,15 @@ export const sshPublicKeyValidationSchema = Yup.string().test( }, ); +export interface DiscoverySourceSetupModalProps { + isOpen?: boolean; + isDisabled?: boolean; + onClose: () => void; + onSubmit: (event: React.FormEvent) => void; +} + // Your component -export const DiscoverySourceSetupModal: React.FC = (props) => { +export const DiscoverySourceSetupModal: React.FC = (props) => { const { isOpen = false, isDisabled = false, onClose, onSubmit } = props; const [sshKey, setSshKey] = useState("");