import React from "react";
import ReactDOM from "react-dom";
import "bootstrap/dist/css/bootstrap.css";
import App from "./components/App";
import io from "socket.io-client";

export const socket = io();

export type NewTickData = {
    tick: number,
    price: number,
    positions: Array<PositionState>
}

export type PositionState = {
    id: number,
    state: string,
    base_price: number,
    symbol: string,
    profit_loss: number,
    profit_loss_percentage: number
}

socket.on("connect", function () {
    console.log("Connected!")
})

ReactDOM.render(<App/>, document.getElementById("root"));
