.
This commit is contained in:
28
app/components/providers/modal-provider.tsx
Normal file
28
app/components/providers/modal-provider.tsx
Normal file
@@ -0,0 +1,28 @@
|
||||
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 />
|
||||
</>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user