import { createContext } from "react";

import { IGlobalData } from "@/types/GlobalData";

import { initalState, IAction } from "@/hooks/useGlobalData";

const GlobalContext = createContext<{ globalData: IGlobalData, setGlobalData: React.Dispatch<IAction> }>({
  globalData: initalState,
  setGlobalData() {}
});

GlobalContext.displayName = "GlobalContext";

export default GlobalContext;
