Skip to content

Commit 33745d1

Browse files
committed
Livestreaming: Active live streaming room
1 parent 6af5b81 commit 33745d1

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

frontend/src/components/blocks/live-streaming-section/index.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ export const LiveStreamingSection = () => {
4141
};
4242

4343
const runningEvent = currentDay?.runningEvents?.filter((event) =>
44-
event.rooms.map((room) => room.id).includes(currentRoom.id),
44+
(event.livestreamingRoom ? [event.livestreamingRoom] : event.rooms).map((room) => room.id).includes(currentRoom.id),
4545
)?.[0];
4646

4747
const hasLiveVideos = currentDay?.rooms?.some((room) => room.streamingUrl);
@@ -162,7 +162,7 @@ const isRoomStreaming = (
162162
) => {
163163
return runningEvents.some(
164164
(event) =>
165-
event.rooms.map((room) => room.id).includes(room.id) &&
165+
(event.livestreamingRoom ? [event.livestreamingRoom] : event.rooms).map((room) => room.id).includes(room.id) &&
166166
event.type !== "custom",
167167
);
168168
};

frontend/src/components/blocks/live-streaming-section/query.graphql

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@ query LiveStreamingSection($code: String!) {
1111
duration
1212
title
1313
type
14+
livestreamingRoom {
15+
id
16+
name
17+
}
1418
rooms {
1519
id
1620
name

0 commit comments

Comments
 (0)