mirror of
https://github.com/Buriburizaem0n/nezha-dash-v1.git
synced 2026-02-04 20:50:08 +00:00
12 lines
280 B
TypeScript
12 lines
280 B
TypeScript
import { createContext } from "react";
|
|
|
|
export interface WebSocketContextType {
|
|
sendMessage: (message: string) => void;
|
|
lastMessage: MessageEvent | null;
|
|
readyState: number;
|
|
}
|
|
|
|
export const WebSocketContext = createContext<WebSocketContextType | undefined>(
|
|
undefined,
|
|
);
|