Add context to import entrypoint
[MAILPOET-2389]
This commit is contained in:
committed by
Jack Kitterhing
parent
8dba06f8b9
commit
6ce548ef1b
@@ -5,6 +5,7 @@ import {
|
|||||||
} from 'react-router-dom';
|
} from 'react-router-dom';
|
||||||
import ScrollToTop from 'common/scroll_to_top.jsx';
|
import ScrollToTop from 'common/scroll_to_top.jsx';
|
||||||
|
|
||||||
|
import { GlobalContext, useGlobalContextValue } from 'context/index.jsx';
|
||||||
import StepMethodSelection from './import/step_method_selection.jsx';
|
import StepMethodSelection from './import/step_method_selection.jsx';
|
||||||
import StepInputValidation from './import/step_input_validation.jsx';
|
import StepInputValidation from './import/step_input_validation.jsx';
|
||||||
import StepDataManipulation from './import/step_data_manipulation.jsx';
|
import StepDataManipulation from './import/step_data_manipulation.jsx';
|
||||||
@@ -17,7 +18,9 @@ const subscribersLimitForValidation = 200;
|
|||||||
const ImportSubscribers = () => {
|
const ImportSubscribers = () => {
|
||||||
const [stepMethodSelectionData, setStepMethodSelectionData] = useState(undefined);
|
const [stepMethodSelectionData, setStepMethodSelectionData] = useState(undefined);
|
||||||
const [stepDataManipulationData, setStepDataManipulationData] = useState({});
|
const [stepDataManipulationData, setStepDataManipulationData] = useState({});
|
||||||
|
const contextValue = useGlobalContextValue(window);
|
||||||
return (
|
return (
|
||||||
|
<GlobalContext.Provider value={contextValue}>
|
||||||
<HashRouter>
|
<HashRouter>
|
||||||
<ScrollToTop>
|
<ScrollToTop>
|
||||||
<Switch>
|
<Switch>
|
||||||
@@ -73,6 +76,7 @@ const ImportSubscribers = () => {
|
|||||||
</Switch>
|
</Switch>
|
||||||
</ScrollToTop>
|
</ScrollToTop>
|
||||||
</HashRouter>
|
</HashRouter>
|
||||||
|
</GlobalContext.Provider>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user