mirror of
https://github.com/Buriburizaem0n/nezha-dash-v1.git
synced 2026-02-04 12:40:10 +00:00
12 lines
260 B
TypeScript
12 lines
260 B
TypeScript
import { createContext } from "react";
|
|
|
|
export interface WebSocketContextType {
|
|
lastMessage: { data: string } | null;
|
|
connected: boolean;
|
|
}
|
|
|
|
export const WebSocketContext = createContext<WebSocketContextType>({
|
|
lastMessage: null,
|
|
connected: false,
|
|
});
|