Remove redundant incoming call bar code

This commit is contained in:
Evan Hahn 2021-09-29 13:30:22 -05:00 committed by GitHub
parent 25dd060a4d
commit f3e07e5376
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -255,16 +255,16 @@ export const IncomingCallBar = (props: PropsType): JSX.Element | null => {
</div>
</div>
<div className="IncomingCallBar__actions">
<CallButton
classSuffix="decline"
onClick={() => {
declineCall({ conversationId });
}}
tabIndex={0}
tooltipContent={i18n('declineCall')}
/>
{isVideoCall ? (
<>
<CallButton
classSuffix="decline"
onClick={() => {
declineCall({ conversationId });
}}
tabIndex={0}
tooltipContent={i18n('declineCall')}
/>
<CallButton
classSuffix="accept-video-as-audio"
onClick={() => {
@ -283,24 +283,14 @@ export const IncomingCallBar = (props: PropsType): JSX.Element | null => {
/>
</>
) : (
<>
<CallButton
classSuffix="decline"
onClick={() => {
declineCall({ conversationId });
}}
tabIndex={0}
tooltipContent={i18n('declineCall')}
/>
<CallButton
classSuffix="accept-audio"
onClick={() => {
acceptCall({ conversationId, asVideoCall: false });
}}
tabIndex={0}
tooltipContent={i18n('acceptCall')}
/>
</>
<CallButton
classSuffix="accept-audio"
onClick={() => {
acceptCall({ conversationId, asVideoCall: false });
}}
tabIndex={0}
tooltipContent={i18n('acceptCall')}
/>
)}
</div>
</div>