Skip to content

Commit

Permalink
Minor: rename a <CallingHeader> prop for clarity
Browse files Browse the repository at this point in the history
  • Loading branch information
EvanHahn-Signal authored and scottnonnenberg-signal committed Nov 30, 2020
1 parent a565747 commit b2087cb
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 14 deletions.
2 changes: 1 addition & 1 deletion ts/components/CallScreen.tsx
Expand Up @@ -232,7 +232,7 @@ export const CallScreen: React.FC<PropsType> = ({
i18n={i18n}
isGroupCall={call.callMode === CallMode.Group}
message={headerMessage}
remoteParticipants={participantCount}
participantCount={participantCount}
showParticipantsList={showParticipantsList}
title={headerTitle}
toggleParticipants={toggleParticipants}
Expand Down
10 changes: 5 additions & 5 deletions ts/components/CallingHeader.stories.tsx
Expand Up @@ -17,9 +17,9 @@ const createProps = (overrideProps: Partial<PropsType> = {}): PropsType => ({
i18n,
isGroupCall: boolean('isGroupCall', Boolean(overrideProps.isGroupCall)),
message: overrideProps.message,
remoteParticipants: number(
'remoteParticipants',
overrideProps.remoteParticipants || 0
participantCount: number(
'participantCount',
overrideProps.participantCount || 0
),
showParticipantsList: boolean(
'showParticipantsList',
Expand All @@ -44,7 +44,7 @@ story.add('With Participants', () => (
{...createProps({
canPip: true,
isGroupCall: true,
remoteParticipants: 10,
participantCount: 10,
})}
/>
));
Expand All @@ -54,7 +54,7 @@ story.add('With Participants (shown)', () => (
{...createProps({
canPip: true,
isGroupCall: true,
remoteParticipants: 10,
participantCount: 10,
showParticipantsList: true,
})}
/>
Expand Down
12 changes: 5 additions & 7 deletions ts/components/CallingHeader.tsx
Expand Up @@ -11,7 +11,7 @@ export type PropsType = {
i18n: LocalizerType;
isGroupCall?: boolean;
message?: string;
remoteParticipants?: number;
participantCount: number;
showParticipantsList: boolean;
title?: string;
toggleParticipants?: () => void;
Expand All @@ -24,7 +24,7 @@ export const CallingHeader = ({
i18n,
isGroupCall = false,
message,
remoteParticipants,
participantCount,
showParticipantsList,
title,
toggleParticipants,
Expand All @@ -42,14 +42,12 @@ export const CallingHeader = ({
{isGroupCall ? (
<div className="module-calling-tools__button">
<Tooltip
content={i18n('calling__participants', [
String(remoteParticipants),
])}
content={i18n('calling__participants', [String(participantCount)])}
theme={TooltipTheme.Dark}
>
<button
aria-label={i18n('calling__participants', [
String(remoteParticipants),
String(participantCount),
])}
className={classNames(
'module-calling-button__participants--container',
Expand All @@ -62,7 +60,7 @@ export const CallingHeader = ({
>
<i className="module-calling-button__participants" />
<span className="module-calling-button__participants--count">
{remoteParticipants}
{participantCount}
</span>
</button>
</Tooltip>
Expand Down
2 changes: 1 addition & 1 deletion ts/components/CallingLobby.tsx
Expand Up @@ -159,7 +159,7 @@ export const CallingLobby = ({
title={conversation.title}
i18n={i18n}
isGroupCall={isGroupCall}
remoteParticipants={participantNames.length}
participantCount={participantNames.length}
showParticipantsList={showParticipantsList}
toggleParticipants={toggleParticipants}
toggleSettings={toggleSettings}
Expand Down

0 comments on commit b2087cb

Please sign in to comment.