Remove previous button from dataloader wizard on configure step
parent
4dea7c9b68
commit
8aa4bc5324
|
@ -74,7 +74,7 @@ class OnboardingButtons extends PureComponent<Props> {
|
|||
private get backButton(): JSX.Element {
|
||||
const {backButtonText, onClickBack} = this.props
|
||||
|
||||
if (!backButtonText || !onClickBack) {
|
||||
if (!onClickBack || !backButtonText) {
|
||||
return
|
||||
}
|
||||
|
||||
|
|
|
@ -77,22 +77,13 @@ class ConfigureDataSourceSwitcher extends PureComponent<Props> {
|
|||
case DataLoaderType.LineProtocol:
|
||||
return (
|
||||
<div className="onboarding-step">
|
||||
<LineProtocol
|
||||
bucket={bucket}
|
||||
org={org}
|
||||
onClickNext={onClickNext}
|
||||
onClickBack={onClickPrevious}
|
||||
/>
|
||||
<LineProtocol bucket={bucket} org={org} onClickNext={onClickNext} />
|
||||
</div>
|
||||
)
|
||||
case DataLoaderType.Scraping:
|
||||
return (
|
||||
<div className="onboarding-step">
|
||||
<Scraping
|
||||
onClickNext={onClickNext}
|
||||
onClickBack={onClickPrevious}
|
||||
buckets={buckets}
|
||||
/>
|
||||
<Scraping onClickNext={onClickNext} buckets={buckets} />
|
||||
</div>
|
||||
)
|
||||
case DataLoaderType.CSV:
|
||||
|
|
|
@ -22,7 +22,6 @@ import {AppState} from 'src/types/v2/index'
|
|||
|
||||
interface OwnProps {
|
||||
onClickNext: () => void
|
||||
onClickBack: () => void
|
||||
buckets: Bucket[]
|
||||
}
|
||||
|
||||
|
@ -56,7 +55,7 @@ export class Scraping extends PureComponent<Props> {
|
|||
}
|
||||
|
||||
public render() {
|
||||
const {scraperBucket, onClickBack, onSetScraperTargetURL, url} = this.props
|
||||
const {scraperBucket, onSetScraperTargetURL, url} = this.props
|
||||
|
||||
return (
|
||||
<Form onSubmit={this.handleSubmit}>
|
||||
|
@ -79,7 +78,6 @@ export class Scraping extends PureComponent<Props> {
|
|||
</FancyScrollbar>
|
||||
</div>
|
||||
<OnboardingButtons
|
||||
onClickBack={onClickBack}
|
||||
autoFocusNext={false}
|
||||
nextButtonStatus={this.nextButtonStatus}
|
||||
nextButtonText={'Finish'}
|
||||
|
|
|
@ -11,7 +11,6 @@ const setup = (override = {}) => {
|
|||
bucket: 'a',
|
||||
org: 'a',
|
||||
onClickNext: jest.fn(),
|
||||
onClickBack: jest.fn(),
|
||||
lineProtocolBody: '',
|
||||
precision: WritePrecision.Ns,
|
||||
setLPStatus: jest.fn(),
|
||||
|
|
|
@ -29,7 +29,6 @@ interface OwnProps {
|
|||
bucket: string
|
||||
org: string
|
||||
onClickNext: () => void
|
||||
onClickBack: () => void
|
||||
}
|
||||
|
||||
interface StateProps {
|
||||
|
@ -65,10 +64,7 @@ export class LineProtocol extends PureComponent<Props> {
|
|||
</div>
|
||||
</FancyScrollbar>
|
||||
</div>
|
||||
<OnboardingButtons
|
||||
onClickBack={this.props.onClickBack}
|
||||
autoFocusNext={true}
|
||||
/>
|
||||
<OnboardingButtons autoFocusNext={true} />
|
||||
</Form>
|
||||
)
|
||||
}
|
||||
|
|
|
@ -46,7 +46,6 @@ exports[`LineProtocol rendering renders! 1`] = `
|
|||
backButtonText="Previous"
|
||||
nextButtonStatus="default"
|
||||
nextButtonText="Continue"
|
||||
onClickBack={[MockFunction]}
|
||||
showSkip={false}
|
||||
skipButtonText="Skip"
|
||||
/>
|
||||
|
|
|
@ -65,7 +65,6 @@ export class SelectDataSourceStep extends PureComponent<Props> {
|
|||
</FancyScrollbar>
|
||||
</div>
|
||||
<OnboardingButtons
|
||||
onClickBack={this.handleClickBack}
|
||||
autoFocusNext={true}
|
||||
nextButtonStatus={this.nextButtonStatus}
|
||||
/>
|
||||
|
@ -154,17 +153,6 @@ export class SelectDataSourceStep extends PureComponent<Props> {
|
|||
this.props.onIncrementCurrentStepIndex()
|
||||
}
|
||||
|
||||
private handleClickBack = () => {
|
||||
const {currentStepIndex, onSetSubstepIndex} = this.props
|
||||
|
||||
if (this.isStreaming) {
|
||||
onSetSubstepIndex(+currentStepIndex, 0)
|
||||
return
|
||||
}
|
||||
|
||||
this.props.onDecrementCurrentStepIndex()
|
||||
}
|
||||
|
||||
private handleSelectDataLoaderType = async (type: DataLoaderType) => {
|
||||
await this.props.onSetDataLoadersType(type)
|
||||
this.handleClickNext()
|
||||
|
|
Loading…
Reference in New Issue