chore: adjust type

This commit is contained in:
GyDi
2022-11-19 17:22:29 +08:00
parent a4c985a219
commit 5fb1afc681
26 changed files with 274 additions and 283 deletions

View File

@@ -45,7 +45,7 @@ const LayoutTraffic = () => {
ws = new WebSocket(`ws://${server}/traffic?token=${secret}`);
ws.addEventListener("message", (event) => {
const data = JSON.parse(event.data) as ApiType.TrafficItem;
const data = JSON.parse(event.data) as ITrafficItem;
trafficRef.current?.appendData(data);
setTraffic(data);
});