Skip to content

Commit f2660b1

Browse files
authored
fix: remove state update for telegraf config id (#4252)
* fix: remove state update for telegraf config id * fix: update to call clearDataLoader action
1 parent 5949609 commit f2660b1

File tree

1 file changed

+16
-2
lines changed

1 file changed

+16
-2
lines changed

src/dataLoaders/components/collectorsWizard/verify/VerifyCollectorsStep.tsx

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ import {AppState} from 'src/types'
2020
// Decorators
2121
import {ErrorHandling} from 'src/shared/decorators/errors'
2222
import {RouteComponentProps, withRouter} from 'react-router-dom'
23+
import {clearDataLoaders} from 'src/dataLoaders/actions/dataLoaders'
2324

2425
type 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
3745
export 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

100114
export default connector(withRouter(VerifyCollectorStep))

0 commit comments

Comments
 (0)