mirror of
https://github.com/Buriburizaem0n/nezha-dash-v1.git
synced 2026-02-05 13:10:09 +00:00
14 lines
315 B
TypeScript
14 lines
315 B
TypeScript
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: [],
|
|
})
|