renamed newdata

This commit is contained in:
Giulio De Pasquale 2020-12-16 11:27:53 +00:00
parent 0f82cd9d8c
commit a7d888f00a

View File

@ -1,7 +1,7 @@
import React, {Component} from "react" import React, {Component} from "react"
import Plot from "react-plotly.js" import Plot from "react-plotly.js"
import {NewTickData, socket} from '../'; import {NewTickMessage, socket} from '../';
type FirstConnectData = { type FirstConnectData = {
@ -53,7 +53,7 @@ class RPlot extends Component<{}, PlotState> {
}) })
}) })
socket.on("new_tick", (data: NewTickData) => { socket.on("new_tick", (data: NewTickMessage) => {
const new_x = [...this.state.x, data.tick]; const new_x = [...this.state.x, data.tick];
const new_y = [...this.state.y, data.price]; const new_y = [...this.state.y, data.price];