remove unnecessary prop

pull/640/head
gabrielburnworth 2018-01-23 17:03:45 -08:00
parent 2bb7606825
commit 226a9b17c5
6 changed files with 1 additions and 11 deletions

View File

@ -20,7 +20,6 @@ import { mount } from "enzyme";
import { Controls } from "../controls";
import { bot } from "../../__test_support__/fake_state/bot";
import { fakePeripheral, fakeWebcamFeed } from "../../__test_support__/fake_state/resources";
import { fakeState } from "../../__test_support__/fake_state";
import { Dictionary } from "farmbot";
import { BooleanSetting } from "../../session_keys";
import { Props } from "../interfaces";
@ -33,7 +32,6 @@ describe("<Controls />", () => {
feeds: [fakeWebcamFeed()],
user: undefined,
peripherals: [fakePeripheral()],
resources: fakeState().resources,
botToMqttStatus: "up"
};
}

View File

@ -43,7 +43,6 @@ export class Controls extends React.Component<Props, {}> {
bot={this.props.bot}
peripherals={this.props.peripherals}
dispatch={this.props.dispatch}
resources={this.props.resources}
disabled={arduinoBusy} />
</Col>
<Col xs={12} sm={6}>
@ -60,7 +59,6 @@ export class Controls extends React.Component<Props, {}> {
bot={this.props.bot}
peripherals={this.props.peripherals}
dispatch={this.props.dispatch}
resources={this.props.resources}
disabled={arduinoBusy} />
</Col>
</Row>}

View File

@ -1,6 +1,5 @@
import { BotState, Xyz, BotPosition } from "../devices/interfaces";
import { Vector3 } from "farmbot/dist";
import { RestResources } from "../resources/interfaces";
import {
TaggedUser,
TaggedWebcamFeed,
@ -14,7 +13,6 @@ export interface Props {
feeds: TaggedWebcamFeed[];
user: TaggedUser | undefined;
peripherals: TaggedPeripheral[];
resources: RestResources;
botToMqttStatus: NetworkState;
}

View File

@ -8,7 +8,6 @@ import { mount } from "enzyme";
import { Peripherals } from "../index";
import { bot } from "../../../__test_support__/fake_state/bot";
import { PeripheralsProps } from "../../../devices/interfaces";
import { buildResourceIndex } from "../../../__test_support__/resource_index_builder";
import { fakePeripheral } from "../../../__test_support__/fake_state/resources";
describe("<Peripherals />", () => {
@ -21,7 +20,6 @@ describe("<Peripherals />", () => {
bot,
peripherals: [fakePeripheral()],
dispatch: jest.fn(),
resources: buildResourceIndex([]),
disabled: false
};
}

View File

@ -18,7 +18,6 @@ export function mapStateToProps(props: Everything): Props {
dispatch: props.dispatch,
bot: props.bot,
user: maybeFetchUser(props.resources.index),
resources,
peripherals,
botToMqttStatus
};

View File

@ -13,7 +13,7 @@ import {
TaggedPeripheral,
TaggedDevice
} from "../resources/tagged_resources";
import { RestResources, ResourceIndex } from "../resources/interfaces";
import { ResourceIndex } from "../resources/interfaces";
import { TaggedUser } from "../resources/tagged_resources";
import { WD_ENV } from "../farmware/weed_detector/remote_env/interfaces";
import { ConnectionStatus, ConnectionState, NetworkState } from "../connectivity/interfaces";
@ -139,7 +139,6 @@ export interface EStopButtonProps {
}
export interface PeripheralsProps {
resources: RestResources;
bot: BotState;
peripherals: TaggedPeripheral[];
dispatch: Function;