|
@@ -100,6 +100,11 @@ type Props = {
|
100
|
100
|
*/
|
101
|
101
|
isHighlighted?: boolean,
|
102
|
102
|
|
|
103
|
+ /**
|
|
104
|
+ * The name of the participant. Used for showing lobby names.
|
|
105
|
+ */
|
|
106
|
+ name?: string,
|
|
107
|
+
|
103
|
108
|
/**
|
104
|
109
|
* Callback for when the mouse leaves this component
|
105
|
110
|
*/
|
|
@@ -123,11 +128,12 @@ export const ParticipantItem = ({
|
123
|
128
|
actionsTrigger = ActionTrigger.Hover,
|
124
|
129
|
audioMuteState = MediaState.None,
|
125
|
130
|
videoMuteState = MediaState.None,
|
|
131
|
+ name,
|
126
|
132
|
participant: p
|
127
|
133
|
}: Props) => {
|
128
|
134
|
const ParticipantActions = Actions[actionsTrigger];
|
129
|
135
|
const { t } = useTranslation();
|
130
|
|
- const name = useSelector(getParticipantDisplayNameWithId(p.id));
|
|
136
|
+ const displayName = name || useSelector(getParticipantDisplayNameWithId(p.id));
|
131
|
137
|
|
132
|
138
|
return (
|
133
|
139
|
<ParticipantContainer
|
|
@@ -141,7 +147,7 @@ export const ParticipantItem = ({
|
141
|
147
|
<ParticipantContent>
|
142
|
148
|
<ParticipantNameContainer>
|
143
|
149
|
<ParticipantName>
|
144
|
|
- { name }
|
|
150
|
+ { displayName }
|
145
|
151
|
</ParticipantName>
|
146
|
152
|
{ p.local ? <span> ({t('chat.you')})</span> : null }
|
147
|
153
|
</ParticipantNameContainer>
|