From 79fcd7eea8d8202a86c0051c64b7ebb1fcc133aa Mon Sep 17 00:00:00 2001 From: IceDBorn Date: Fri, 24 Mar 2023 11:15:21 +0200 Subject: [PATCH] Print room and space name on header --- src/app/organisms/room/JitsiRoom.jsx | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/app/organisms/room/JitsiRoom.jsx b/src/app/organisms/room/JitsiRoom.jsx index c97ee12f..12b2b5fc 100644 --- a/src/app/organisms/room/JitsiRoom.jsx +++ b/src/app/organisms/room/JitsiRoom.jsx @@ -1,22 +1,22 @@ import React, { useState, useEffect, useRef } from 'react'; import './JitsiRoom.scss'; import { JitsiMeeting } from '@jitsi/react-sdk'; -import SearchIC from '../../../../public/res/ic/filled/hangup_call.svg'; import Draggable from 'react-draggable'; +import SearchIC from '../../../../public/res/ic/filled/hangup_call.svg'; +import { openNavigation } from '../../../client/action/navigation'; import initMatrix from '../../../client/initMatrix'; import cons from '../../../client/state/cons'; import RoomTimeline from '../../../client/state/RoomTimeline'; import navigation from '../../../client/state/navigation'; -import { openNavigation } from '../../../client/action/navigation'; import { getUsername } from '../../../util/matrixUtil'; import Button from '../../atoms/button/Button'; +import { useSelectedSpace } from '../../hooks/useSelectedSpace'; const TOPIC_JITSI_CALL = 'd38dd491fefa1cfffc27f9c57f2bdb4a' function JitsiRoom({ isJitsiRoom, setIsJitsiRoom }) { const [jitsiCallId, setJitsiCallId] = useState(null); - const [roomInfo, setRoomInfo] = useState({ roomTimeline: null, eventId: null, @@ -26,6 +26,7 @@ function JitsiRoom({ isJitsiRoom, setIsJitsiRoom }) { const openerRef = useRef(null); const mx = initMatrix.matrixClient; + const spaceName = mx.getRoom(useSelectedSpace())?.name; useEffect(() => { const handleRoomSelected = (rId, pRoomId, eId) => { @@ -72,7 +73,7 @@ function JitsiRoom({ isJitsiRoom, setIsJitsiRoom }) {
- {roomName} + {roomName} / {spaceName}