@@ -6,9 +6,14 @@ import ConnectionState from "../../networking/ConnectionState";
6
6
import { useAppSelector } from "../../redux/hooks" ;
7
7
import { selectCurrentSession } from "../../redux/slices/sessionsListSlice" ;
8
8
import { ParticipantChatTab } from "../../components/molecules/ChatTab/ParticipantChatTab" ;
9
- import { selectChatTab , selectInstructionsTab } from "../../redux/slices/tabsSlice" ;
9
+ import {
10
+ selectChatGptTab ,
11
+ selectChatTab ,
12
+ selectInstructionsTab
13
+ } from "../../redux/slices/tabsSlice" ;
10
14
import { InstructionsTab } from "../../components/molecules/InstructionsTab/InstructionsTab" ;
11
15
import "./MeetingRoom.css" ;
16
+ import { ChatGptTab } from "../../components/molecules/ChatGptTab/ChatGptTab" ;
12
17
13
18
function MeetingRoom ( { localStream, connection, onGetSession, onChat } ) {
14
19
const videoElement = useRef ( null ) ;
@@ -19,6 +24,7 @@ function MeetingRoom({ localStream, connection, onGetSession, onChat }) {
19
24
const [ participantStream , setParticipantStream ] = useState ( null ) ;
20
25
const isChatModalActive = useAppSelector ( selectChatTab ) ;
21
26
const isInstructionsModalActive = useAppSelector ( selectInstructionsTab ) ;
27
+ const isChatGptModalActive = useAppSelector ( selectChatGptTab ) ;
22
28
const [ searchParams , setSearchParams ] = useSearchParams ( ) ;
23
29
const sessionIdParam = searchParams . get ( "sessionId" ) ;
24
30
const participantIdParam = searchParams . get ( "participantId" ) ;
@@ -116,6 +122,8 @@ function MeetingRoom({ localStream, connection, onGetSession, onChat }) {
116
122
glassDetected = { glassDetected }
117
123
/>
118
124
) }
125
+
126
+ { connectionState === ConnectionState . CONNECTED && isChatGptModalActive && < ChatGptTab /> }
119
127
</ div >
120
128
</ div >
121
129
</ >
0 commit comments