From 594e28f24810d41c0f3337b8a1c7b1ba9a4d07cd Mon Sep 17 00:00:00 2001 From: Karel Hala Date: Mon, 16 Dec 2024 16:43:21 +0100 Subject: [PATCH] Fix create integration by consuming store from parent component (#657) --- .../Integrations/Create/IntegrationWizard.tsx | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/src/pages/Integrations/Create/IntegrationWizard.tsx b/src/pages/Integrations/Create/IntegrationWizard.tsx index 90abcef6..8e87ca5a 100644 --- a/src/pages/Integrations/Create/IntegrationWizard.tsx +++ b/src/pages/Integrations/Create/IntegrationWizard.tsx @@ -23,6 +23,8 @@ import { updateEndpoint, } from '../../../api/helpers/integrations/endpoints-helper'; import { useNotification } from '../../../utils/AlertUtils'; +import { Provider } from 'react-redux'; +import { Store } from 'redux'; export interface IntegrationWizardProps { category: string; @@ -40,6 +42,7 @@ export interface IntegrationWizardProps { closeModal: () => void; afterSubmit: () => void; } + export const IntegrationWizard: React.FunctionComponent< IntegrationWizardProps > = ({ @@ -134,4 +137,16 @@ export const IntegrationWizard: React.FunctionComponent< ); }; -export default IntegrationWizard; +const IntegrationWizardWrapper: React.FC< + { store?: Store } & IntegrationWizardProps +> = ({ store, ...props }) => { + return store ? ( + + + + ) : ( + + ); +}; + +export default IntegrationWizardWrapper;