From a6e946442cf1860ff18afa8ccf5668482387031c Mon Sep 17 00:00:00 2001 From: Sidharth Mohanty Date: Sat, 12 Mar 2022 16:33:46 +0530 Subject: [PATCH] Add In-App Chat into greenroom Allowing presenter to chat with participants --- app/.env.local.sample | 4 ++- app/pages/virtualconf/greenroom/index.js | 34 ++++++++++++++++++++++-- 2 files changed, 35 insertions(+), 3 deletions(-) diff --git a/app/.env.local.sample b/app/.env.local.sample index 4bc903bf..1c650cb0 100644 --- a/app/.env.local.sample +++ b/app/.env.local.sample @@ -24,4 +24,6 @@ COOKIE_SECRET_PREVIOUS= # for development http://localhost:3000 NEXT_PUBLIC_ROCKET_CHAT_HOST=required # id of the room where conf will take place -NEXT_PUBLIC_ROCKET_CHAT_CONF_RID=required \ No newline at end of file +NEXT_PUBLIC_ROCKET_CHAT_CONF_RID=required +# id of the greenroom +NEXT_PUBLIC_ROCKET_CHAT_GREENROOM_RID=required diff --git a/app/pages/virtualconf/greenroom/index.js b/app/pages/virtualconf/greenroom/index.js index 67bf7829..0de969e6 100644 --- a/app/pages/virtualconf/greenroom/index.js +++ b/app/pages/virtualconf/greenroom/index.js @@ -1,17 +1,40 @@ +import { useState } from "react"; import Head from "next/head"; +import Script from "next/script"; import styles from "../../../styles/Mainstage.module.css"; import { Container, Row, Col } from "react-bootstrap"; import Jitsibroadcaster from '../../../components/clientsideonly/jitsibroadcaster' +import InAppChat from "../../../components/inappchat/inappchat"; +import { Button } from "react-bootstrap"; -const Greenroom = () => { +const greenroom_rid = process.env.NEXT_PUBLIC_ROCKET_CHAT_GREENROOM_RID; + +const Greenroom = ({ cookies }) => { + const [openChat, setOpenChat] = useState(false); + + const handleOpenChat = () => { + setOpenChat((prevState) => !prevState); + }; return ( <> Conference Green Room +