feat: chart history on browser

This commit is contained in:
hamster1963
2024-12-25 11:03:11 +08:00
parent 1a1ceb4665
commit 112607740a
5 changed files with 399 additions and 132 deletions
+2
View File
@@ -3,9 +3,11 @@ import { createContext } from "react"
export interface WebSocketContextType {
lastMessage: { data: string } | null
connected: boolean
messageHistory: { data: string }[]
}
export const WebSocketContext = createContext<WebSocketContextType>({
lastMessage: null,
connected: false,
messageHistory: [],
})