modal working way better now

This commit is contained in:
Arjun Patel
2022-01-16 21:06:20 -08:00
parent d357e16ac5
commit 2ada680e3e
3 changed files with 49 additions and 28 deletions
+21 -7
View File
@@ -1,18 +1,32 @@
import { Modal } from "antd";
import { useKeyboardContext } from "../../contexts/keyboardContext";
import { useEffect } from "react";
import {
ShowModalType,
useKeyboardContext,
} from "../../contexts/keyboardContext";
export default function CreateRoom() {
const { createRoom } = useKeyboardContext();
const thisModalType = ShowModalType.createRoom;
console.log(createRoom);
export default function CreateRoomModal() {
const { pastedLink, handleModalType, showModalType } = useKeyboardContext();
useEffect(() => {
// check if link is valid google meet link
}, []);
const handleCloseModal = () => {
handleModalType(ShowModalType.na);
};
const handleSubmit = () => {};
return (
<Modal
title="Create Room"
centered
visible={createRoom.showModal}
// onOk={() => this.setModal2Visible(false)}
// onCancel={() => this.setModal2Visible(false)}
visible={showModalType == thisModalType ? true : false}
onOk={handleSubmit}
onCancel={handleCloseModal}
>
<p>some contents...</p>
<p>some contents...</p>