File tree Expand file tree Collapse file tree 1 file changed +16
-2
lines changed
src/dataLoaders/components/collectorsWizard/verify Expand file tree Collapse file tree 1 file changed +16
-2
lines changed Original file line number Diff line number Diff line change @@ -20,6 +20,7 @@ import {AppState} from 'src/types'
2020// Decorators
2121import { ErrorHandling } from 'src/shared/decorators/errors'
2222import { RouteComponentProps , withRouter } from 'react-router-dom'
23+ import { clearDataLoaders } from 'src/dataLoaders/actions/dataLoaders'
2324
2425type OwnProps = CollectorsStepProps
2526
@@ -31,7 +32,14 @@ interface StateProps {
3132 token : string
3233}
3334
34- export type Props = StateProps & OwnProps & RouteComponentProps < { orgID : string } >
35+ interface DispatchProps {
36+ onClearDataLoaders : ( ) => void
37+ }
38+
39+ export type Props = StateProps &
40+ DispatchProps &
41+ OwnProps &
42+ RouteComponentProps < { orgID : string } >
3543
3644@ErrorHandling
3745export class VerifyCollectorStep extends PureComponent < Props > {
@@ -76,7 +84,9 @@ export class VerifyCollectorStep extends PureComponent<Props> {
7684 match : {
7785 params : { orgID} ,
7886 } ,
87+ onClearDataLoaders,
7988 } = this . props
89+ onClearDataLoaders ( )
8090 this . props . history . push ( `/orgs/${ orgID } /load-data/telegrafs` )
8191 }
8292}
@@ -95,6 +105,10 @@ const mstp = ({
95105 token,
96106} )
97107
98- const connector = connect < StateProps > ( mstp )
108+ const mdtp = {
109+ onClearDataLoaders : clearDataLoaders ,
110+ }
111+
112+ const connector = connect < StateProps , DispatchProps > ( mstp , mdtp )
99113
100114export default connector ( withRouter ( VerifyCollectorStep ) )
You can’t perform that action at this time.
0 commit comments