Farmbot-Web-App/frontend/sequences/step_tiles/tile_if.tsx

20 lines
594 B
TypeScript

import * as React from "react";
import { StepParams } from "../interfaces";
import { InnerIf } from "./tile_if/index";
export function TileIf(props: StepParams) {
if (props.currentStep.kind === "_if") {
return <InnerIf
currentSequence={props.currentSequence}
currentStep={props.currentStep}
dispatch={props.dispatch}
index={props.index}
resources={props.resources}
shouldDisplay={props.shouldDisplay}
confirmStepDeletion={props.confirmStepDeletion}
showPins={props.showPins} />;
} else {
return <p>{"Expected `_if` node"}</p>;
}
}