import React from "react";
import CreateServerChannelModal from "../modals/create-server-channel-modal";
import CreateServerInviteModal from "../modals/create-server-invite-modal";
import CreateServerModal from "../modals/create-server-modal";
import DeleteServerConfirmModal from "../modals/delete-server-confirm-modal";
import UpdateProfileModal from "../modals/update-profile-modal";

export default function ModalProvider() {
    const [isMounted, setIsMounted] = React.useState(false);

    React.useEffect(() => {
        setIsMounted(true);
    }, []);

    if (!isMounted) {
        return null;
    }

    return (
        <>
            <CreateServerModal />
            <CreateServerChannelModal />
            <CreateServerInviteModal />
            <DeleteServerConfirmModal />
            <UpdateProfileModal />
        </>
    );
}
