From b2087cb8a24f1c99e4ee8f73e197d984512179c9 Mon Sep 17 00:00:00 2001 From: Evan Hahn <69474926+EvanHahn-Signal@users.noreply.github.com> Date: Wed, 25 Nov 2020 12:16:51 -0600 Subject: [PATCH] Minor: rename a prop for clarity --- ts/components/CallScreen.tsx | 2 +- ts/components/CallingHeader.stories.tsx | 10 +++++----- ts/components/CallingHeader.tsx | 12 +++++------- ts/components/CallingLobby.tsx | 2 +- 4 files changed, 12 insertions(+), 14 deletions(-) diff --git a/ts/components/CallScreen.tsx b/ts/components/CallScreen.tsx index dece37595c5..1cab88490bd 100644 --- a/ts/components/CallScreen.tsx +++ b/ts/components/CallScreen.tsx @@ -232,7 +232,7 @@ export const CallScreen: React.FC = ({ i18n={i18n} isGroupCall={call.callMode === CallMode.Group} message={headerMessage} - remoteParticipants={participantCount} + participantCount={participantCount} showParticipantsList={showParticipantsList} title={headerTitle} toggleParticipants={toggleParticipants} diff --git a/ts/components/CallingHeader.stories.tsx b/ts/components/CallingHeader.stories.tsx index bb3a8f6c1b1..ccd6cebe800 100644 --- a/ts/components/CallingHeader.stories.tsx +++ b/ts/components/CallingHeader.stories.tsx @@ -17,9 +17,9 @@ const createProps = (overrideProps: Partial = {}): 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', @@ -44,7 +44,7 @@ story.add('With Participants', () => ( {...createProps({ canPip: true, isGroupCall: true, - remoteParticipants: 10, + participantCount: 10, })} /> )); @@ -54,7 +54,7 @@ story.add('With Participants (shown)', () => ( {...createProps({ canPip: true, isGroupCall: true, - remoteParticipants: 10, + participantCount: 10, showParticipantsList: true, })} /> diff --git a/ts/components/CallingHeader.tsx b/ts/components/CallingHeader.tsx index b7d17ed0b5f..c25f5275fe6 100644 --- a/ts/components/CallingHeader.tsx +++ b/ts/components/CallingHeader.tsx @@ -11,7 +11,7 @@ export type PropsType = { i18n: LocalizerType; isGroupCall?: boolean; message?: string; - remoteParticipants?: number; + participantCount: number; showParticipantsList: boolean; title?: string; toggleParticipants?: () => void; @@ -24,7 +24,7 @@ export const CallingHeader = ({ i18n, isGroupCall = false, message, - remoteParticipants, + participantCount, showParticipantsList, title, toggleParticipants, @@ -42,14 +42,12 @@ export const CallingHeader = ({ {isGroupCall ? (
diff --git a/ts/components/CallingLobby.tsx b/ts/components/CallingLobby.tsx index 863ae5b06a8..fea2f9f1ce8 100644 --- a/ts/components/CallingLobby.tsx +++ b/ts/components/CallingLobby.tsx @@ -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}