Skip to content

Commit

Permalink
fix: remove template appdata usage
Browse files Browse the repository at this point in the history
  • Loading branch information
raviteja83 authored Aug 29, 2023
1 parent b3f5c91 commit b972ac4
Showing 1 changed file with 2 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import {
selectLocalPeerID,
selectPeerByID,
selectPermissions,
selectTemplateAppData,
selectTrackByID,
selectVideoTrackByPeerID,
useHMSStore,
Expand Down Expand Up @@ -34,10 +33,7 @@ const TileMenu = ({ audioTrackID, videoTrackID, peerID, isScreenshare = false, c
const showSpotlight = changeRole;

const isPrimaryVideoTrack = useHMSStore(selectVideoTrackByPeerID(peerID))?.id === videoTrackID;
const uiMode = useHMSStore(selectTemplateAppData).uiMode;
const isInset = uiMode === 'inset';

const showPinAction = (audioTrackID || (videoTrackID && isPrimaryVideoTrack)) && !isInset;
const showPinAction = audioTrackID || (videoTrackID && isPrimaryVideoTrack);

const track = useHMSStore(selectTrackByID(videoTrackID));
const hideSimulcastLayers = !track?.layerDefinitions?.length || track.degraded || !track.enabled;
Expand All @@ -50,7 +46,7 @@ const TileMenu = ({ audioTrackID, videoTrackID, peerID, isScreenshare = false, c
return null;
}

if (isInset && isLocal) {
if (isLocal) {
return null;
}
const openNameChangeModal = () => setShowNameChangeModal(true);
Expand Down

0 comments on commit b972ac4

Please sign in to comment.