From e94ea58501e8c9cbc939592b6500061e0e2fa8d8 Mon Sep 17 00:00:00 2001 From: Arjun Patel Date: Sun, 16 Jan 2022 23:04:51 -0800 Subject: [PATCH] modal create button working --- components/Dashboard/Rooms.tsx | 19 ++++++++++++++++--- components/Modals/CreateRoom.tsx | 19 ++++++++++++++++--- 2 files changed, 32 insertions(+), 6 deletions(-) diff --git a/components/Dashboard/Rooms.tsx b/components/Dashboard/Rooms.tsx index 924a89b..862b39b 100644 --- a/components/Dashboard/Rooms.tsx +++ b/components/Dashboard/Rooms.tsx @@ -5,6 +5,10 @@ import { IoTimer } from "react-icons/io5"; import { BsThreeDots } from "react-icons/bs"; import Image from "next/image"; import CreateRoom from "../Modals/CreateRoom"; +import { + ShowModalType, + useKeyboardContext, +} from "../../contexts/keyboardContext"; enum RoomTypeFilter { all = "all", @@ -21,6 +25,8 @@ enum RoomTimeFilter { } export default function DashboardRoom() { + const { handleModalType } = useKeyboardContext(); + // get rooms data realtime useEffect(() => { /** @@ -57,7 +63,11 @@ export default function DashboardRoom() { - Live + Me + + + + Now @@ -69,7 +79,7 @@ export default function DashboardRoom() { - Expired + Archive @@ -77,7 +87,10 @@ export default function DashboardRoom() { Week - diff --git a/components/Modals/CreateRoom.tsx b/components/Modals/CreateRoom.tsx index af749cf..f92ef5e 100644 --- a/components/Modals/CreateRoom.tsx +++ b/components/Modals/CreateRoom.tsx @@ -66,9 +66,22 @@ export default function CreateRoomModal() {
Link - - Please make sure this is valid so that your team can join properly. - + {roomLink ? ( + + Please make sure this is valid so that your team can join + properly. + + ) : ( + + Click here to create one. + + )} +