Browse Source

Fixed compilation issues

update-deps
Alex Mikhalev 7 years ago
parent
commit
5ff2825fb1
  1. 4
      app/components/DeviceView.tsx
  2. 4
      app/components/MessageTest.tsx
  3. 4
      app/components/MessagesView.tsx
  4. 2
      app/components/RunSectionForm.tsx
  5. 5
      app/index.tsx
  6. 2
      app/state/StateBase.ts

4
app/components/DeviceView.tsx

@ -3,7 +3,7 @@ import { observer } from "mobx-react"; @@ -3,7 +3,7 @@ import { observer } from "mobx-react";
import * as React from "react";
import { Grid, Header, Icon, Item } from "semantic-ui-react";
import { injectState, MqttApiState } from "@app/state";
import { injectState, StateBase } from "@app/state";
import { SprinklersDevice } from "@common/sprinklers";
import { ProgramTable, RunSectionForm, SectionRunnerView, SectionTable } from ".";
@ -23,7 +23,7 @@ function ConnectionState({ connected, className }: { connected: boolean, classNa @@ -23,7 +23,7 @@ function ConnectionState({ connected, className }: { connected: boolean, classNa
interface DeviceViewProps {
deviceId: string;
state: MqttApiState;
state: StateBase;
}
class DeviceView extends React.Component<DeviceViewProps> {

4
app/components/MessageTest.tsx

@ -1,10 +1,10 @@ @@ -1,10 +1,10 @@
import * as React from "react";
import { Button, Segment } from "semantic-ui-react";
import { injectState, MqttApiState } from "@app/state";
import { injectState, StateBase } from "@app/state";
import { getRandomId } from "@common/utils";
class MessageTest extends React.Component<{ state: MqttApiState }> {
class MessageTest extends React.Component<{ state: StateBase }> {
render() {
return (
<Segment>

4
app/components/MessagesView.tsx

@ -3,7 +3,7 @@ import { observer } from "mobx-react"; @@ -3,7 +3,7 @@ import { observer } from "mobx-react";
import * as React from "react";
import { Message, MessageProps, TransitionGroup } from "semantic-ui-react";
import { injectState, MqttApiState, UiMessage, UiStore } from "@app/state/";
import { injectState, StateBase, UiMessage, UiStore } from "@app/state/";
@observer
class MessageView extends React.Component<{
@ -33,7 +33,7 @@ class MessageView extends React.Component<{ @@ -33,7 +33,7 @@ class MessageView extends React.Component<{
}
}
class MessagesView extends React.Component<{ state: MqttApiState }> {
class MessagesView extends React.Component<{ state: StateBase }> {
render() {
const { uiStore } = this.props.state;
const messages = uiStore.messages.map((message) => (

2
app/components/RunSectionForm.tsx

@ -1,7 +1,7 @@ @@ -1,7 +1,7 @@
import { computed } from "mobx";
import { observer } from "mobx-react";
import * as React from "react";
import { DropdownItemProps, DropdownProps, Form, Grid, Header, Segment } from "semantic-ui-react";
import { DropdownItemProps, DropdownProps, Form, Header, Segment } from "semantic-ui-react";
import { Duration } from "@common/Duration";
import log from "@common/logger";

5
app/index.tsx

@ -3,12 +3,13 @@ import * as ReactDOM from "react-dom"; @@ -3,12 +3,13 @@ import * as ReactDOM from "react-dom";
import { AppContainer } from "react-hot-loader";
import App from "@app/components/App";
import { ProvideState, WebApiState } from "@app/state";
import { ProvideState, StateBase } from "@app/state";
import { WebApiState as StateClass } from "@app/state/web";
// import log from "@common/logger";
// Object.assign(log, { name: "sprinklers3/app", level: "debug" });
const state = new WebApiState();
const state: StateBase = new StateClass();
state.start();
const rootElem = document.getElementById("app");

2
app/state/StateBase.ts

@ -1,5 +1,5 @@ @@ -1,5 +1,5 @@
import { ISprinklersApi } from "@common/sprinklers";
import { UiMessage, UiStore } from "./ui";
import { UiStore } from "./ui";
export default abstract class StateBase {
abstract readonly sprinklersApi: ISprinklersApi;

Loading…
Cancel
Save