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"; type AppState = { current_price: number, current_tick: number, last_update: Date, positions: Array } class App extends Component<{}, AppState> { state = { current_price: 0, current_tick: 0, last_update: new Date(), positions: [] } constructor(props) { super(props) } componentDidMount() { socket.on("new_tick", (data: NewTickData) => { this.setState({ current_price: data.price, current_tick: data.tick, last_update: new Date(), positions: data.positions }) }) } render() { return (
Rustico - BfxBot {/* Toolbar column */} {/* Graph column */}

Price graph:

{/* */}
) } } export default App;