import { createContext } from "react";

export type GlobalData = {
  chatId: string | undefined,
  ws: WebSocket | undefined,
  name: string,
  chat: string[]
}
const global: GlobalData = {
  chatId: undefined,
  ws: undefined,
  name: "",
  chat: []
};

const GlobalContext = createContext(global);

export { GlobalContext, global };