diff --git a/websrc/components/App.tsx b/websrc/components/App.tsx index c0456bc..bcf069a 100644 --- a/websrc/components/App.tsx +++ b/websrc/components/App.tsx @@ -1,9 +1,9 @@ -import React, { Component } from "react"; -import { Col, Container, Nav, Navbar, Row } from "react-bootstrap"; +import React, {Component} from "react"; +import {Col, Container, Navbar, Row} from "react-bootstrap"; import HCard from "./HCard"; import RPlot from "./RPlot"; -import { NewTickData, PositionState, socket } from "../"; -import { PositionTable } from "./Tables"; +import {NewTickData, PositionState, socket} from "../"; +import {PositionTable} from "./Tables"; type AppState = { current_price: number, @@ -13,11 +13,7 @@ type AppState = { } -class App extends Component { - constructor(props) { - super(props) - } - +class App extends Component<{}, AppState> { state = { current_price: 0, current_tick: 0, @@ -25,6 +21,10 @@ class App extends Component { positions: [] } + constructor(props) { + super(props) + } + componentDidMount() { socket.on("new_tick", (data: NewTickData) => { this.setState({ @@ -48,11 +48,13 @@ class App extends Component { {/* Toolbar column */} - - + + - + @@ -62,13 +64,13 @@ class App extends Component {

Price graph:

- + {/* */} - +