From 2ca348aac26e815dcafdf2ead5e2b02869fc5ea5 Mon Sep 17 00:00:00 2001 From: roro-lv Date: Tue, 5 Apr 2022 17:45:42 +0200 Subject: [PATCH] remove forgotten deleted files --- .../InstructorViewersList/index.tsx | 179 ------------------ .../ViewersList/StudentViewersList/index.tsx | 102 ---------- 2 files changed, 281 deletions(-) delete mode 100644 src/frontend/components/ViewersList/InstructorViewersList/index.tsx delete mode 100644 src/frontend/components/ViewersList/StudentViewersList/index.tsx diff --git a/src/frontend/components/ViewersList/InstructorViewersList/index.tsx b/src/frontend/components/ViewersList/InstructorViewersList/index.tsx deleted file mode 100644 index 1950fe861b..0000000000 --- a/src/frontend/components/ViewersList/InstructorViewersList/index.tsx +++ /dev/null @@ -1,179 +0,0 @@ -import React, { useMemo } from 'react'; -import { Box, Button, List } from 'grommet'; -import { AddCircle } from 'grommet-icons'; -import { defineMessages, useIntl } from 'react-intl'; - -import { - useParticipantsStore, - ParticipantType, -} from 'data/stores/useParticipantsStore'; -import { Video } from 'types/tracks'; -import { ViewersListHeader } from 'components/ViewersList/components/ViewersListHeader'; -import { ViewersListItem } from 'components/ViewersList/components/ViewersListItem'; -import { converse } from 'utils/window'; -import { ViewersListItemContainer } from 'components/ViewersList/components/ViewersListItemContainer'; -import { ViewersListTextButton } from 'components/ViewersList/components/ViewersListTextButton'; - -const messages = defineMessages({ - demands: { - defaultMessage: 'Demands', - description: - 'Participants asking for going on stage are displayed under this label.', - id: 'components.ViewersList.demands', - }, - onStage: { - defaultMessage: 'On stage', - description: 'On-stage participants are displayed under this label.', - id: 'components.ViewersList.onStage', - }, - otherViewers: { - defaultMessage: 'Other participants', - description: 'Connected participants are displayed under this label.', - id: 'components.ViewersList.otherViewers', - }, - acceptButton: { - defaultMessage: 'Accept', - description: - 'The text displayed in the button in charge of accepting on-stage request, in the viewers list.', - id: 'components.ViewersList.acceptButton', - }, - endOnStageButton: { - defaultMessage: 'Terminate', - description: - 'The text displayed in the button in charge of making students on stage exiting the stage, in the viewers list.', - id: 'components.ViewersList.endOnStageButton', - }, -}); - -interface InstructorViewersListProps { - video: Video; -} - -export const InstructorViewersList = ({ - video, -}: InstructorViewersListProps) => { - const participants = useParticipantsStore((state) => state.participants); - const participantsOnStage = useMemo( - () => - participants.filter( - (participant) => - participant.isInstructor || - video.participants_in_discussion.some( - (p) => p.name === participant.name, - ), - ), - [participants, video.participants_in_discussion], - ); - - const participantsNotOnStageAndNotAsking = useMemo( - () => - participants.filter( - (participant) => - !participantsOnStage.includes(participant) && - !video.participants_asking_to_join.some( - (p) => p.name === participant.name, - ), - ), - [participants, participantsOnStage, video.participants_asking_to_join], - ); - const intl = useIntl(); - - return ( - - {video.participants_asking_to_join.length !== 0 && ( - - - - participantA.name.localeCompare(participantB.name), - )} - pad="none" - > - {(item: ParticipantType, index: number) => ( - - - -