import React, { useEffect } from "react";
import { useOrganizationModal } from "./hooks/useOrganization";
import OrganizationModal from "./components/Organization/OrganizationModal";
import { useAuthModal } from "./hooks/useAuth";
import SwitchTenant from "./pages/authentication/SwitchTenant";

const ModalProvider = () => {
  const { isOpen, onClose } = useOrganizationModal();
  const { isOpen: isAuthOpen } = useAuthModal();

  return (
    <>
      {isOpen && <OrganizationModal />}
      {isAuthOpen && <SwitchTenant />}
    </>
  );
};

export default ModalProvider;