From 86748fb81c998341320acaaf68cd855004b83524 Mon Sep 17 00:00:00 2001 From: Kevin Szuchet Date: Wed, 9 Aug 2023 11:22:23 +0200 Subject: [PATCH] chore: Comment the non used declaration --- .../Pages/SignInPage/SignInPage.module.css | 1 + .../VideoConference/ParticipantTile.tsx | 32 +++++++++---------- .../VideoConference/Videoconference.tsx | 7 ++-- 3 files changed, 20 insertions(+), 20 deletions(-) diff --git a/src/components/Pages/SignInPage/SignInPage.module.css b/src/components/Pages/SignInPage/SignInPage.module.css index 948a332..a269a75 100644 --- a/src/components/Pages/SignInPage/SignInPage.module.css +++ b/src/components/Pages/SignInPage/SignInPage.module.css @@ -1,5 +1,6 @@ .content { display: flex; + flex-direction: column; align-items: center; justify-content: center; height: 100%; diff --git a/src/components/VideoConference/ParticipantTile.tsx b/src/components/VideoConference/ParticipantTile.tsx index 299121f..7cd6b7c 100644 --- a/src/components/VideoConference/ParticipantTile.tsx +++ b/src/components/VideoConference/ParticipantTile.tsx @@ -1,8 +1,5 @@ -import * as React from "react" -import type { Participant, TrackPublication } from "livekit-client" -import { Track } from "livekit-client" -import type { ParticipantClickEvent, TrackReferenceOrPlaceholder } from "@livekit/components-core" -import { isParticipantSourcePinned } from "@livekit/components-core" +import * as React from 'react' +import { isParticipantSourcePinned } from '@livekit/components-core' import { AudioTrack, ConnectionQualityIndicator, @@ -15,9 +12,12 @@ import { useMaybeLayoutContext, useMaybeParticipantContext, useMaybeTrackContext, - useParticipantTile, -} from "@livekit/components-react" -import Profile from "decentraland-dapps/dist/containers/Profile" + useParticipantTile +} from '@livekit/components-react' +import { Track } from 'livekit-client' +import Profile from 'decentraland-dapps/dist/containers/Profile' +import type { ParticipantClickEvent, TrackReferenceOrPlaceholder } from '@livekit/components-core' +import type { Participant, TrackPublication } from 'livekit-client' /** @public */ export function ParticipantContextIfNeeded( @@ -40,7 +40,7 @@ export interface ParticipantTileProps extends React.HTMLAttributes void - imageSize?: "normal" | "large" | "huge" | "massive" + imageSize?: 'normal' | 'large' | 'huge' | 'massive' } /** @@ -69,7 +69,7 @@ export function ParticipantTile({ const trackRef: TrackReferenceOrPlaceholder = useMaybeTrackContext() ?? { participant: p, source, - publication, + publication } const { elementProps } = useParticipantTile({ @@ -78,7 +78,7 @@ export function ParticipantTile({ source: trackRef.source, publication: trackRef.publication, disableSpeakingIndicator, - onParticipantClick, + onParticipantClick }) const layoutContext = useMaybeLayoutContext() @@ -92,7 +92,7 @@ export function ParticipantTile({ layoutContext.pin.dispatch && isParticipantSourcePinned(trackRef.participant, trackRef.source, layoutContext.pin.state) ) { - layoutContext.pin.dispatch({ msg: "clear_pin" }) + layoutContext.pin.dispatch({ msg: 'clear_pin' }) } }, [trackRef.participant, layoutContext, trackRef.source] @@ -101,17 +101,17 @@ export function ParticipantTile({ const participantWithProfile: Participant = React.useMemo( () => ({ ...trackRef.participant, - name: "Edita me", + name: 'Edita me' }), [trackRef.participant] ) as Participant return ( -
+
{children ?? ( <> - {trackRef.publication?.kind === "video" || + {trackRef.publication?.kind === 'video' || trackRef.source === Track.Source.Camera || trackRef.source === Track.Source.ScreenShare ? ( {trackRef.source === Track.Source.Camera ? ( <> - + ) : ( diff --git a/src/components/VideoConference/Videoconference.tsx b/src/components/VideoConference/Videoconference.tsx index 392205e..a1830a4 100644 --- a/src/components/VideoConference/Videoconference.tsx +++ b/src/components/VideoConference/Videoconference.tsx @@ -12,7 +12,7 @@ import { MessageFormatter, RoomAudioRenderer, useCreateLayoutContext, - useParticipants, + // useParticipants, usePinnedTracks, useTracks } from '@livekit/components-react' @@ -56,10 +56,9 @@ export function VideoConference({ chatMessageFormatter, ...props }: VideoConfere ) // TODO: remove this unused declaration if it's not needed - // eslint-disable-next-line @typescript-eslint/no-unused-vars - const participants = useParticipants({ + /* const participants = useParticipants({ updateOnlyOn: [RoomEvent.ParticipantConnected, RoomEvent.ParticipantDisconnected] - }) + }) */ const widgetUpdate = (state: WidgetState) => { log.debug('updating widget state', state)