import { create } from "zustand";

interface ModalStore {
  modal: React.ReactNode | null;
  setModal: (modal: React.ReactNode | null) => void;
}

const useModal = create<ModalStore>((set) => ({
  modal: null,
  setModal: (modal) => set(() => ({ modal: modal })),
}));

export default useModal;
