INNER CODE UNIT · JavaScript
isUnknownParticipant
twilio-labs/function-templates · experimental-flex-dialpad/ui-src/src/components/ExternalTransfer/index.js:37
const isUnknownParticipant = (props) =>
props.participant.participantType === 'unknown';
const isNotTransferParticipant = (props) =>
props.participant.participantType !== 'transfer';
// This section is for the full width ParticipantCanvas
flex.ParticipantCanvas.Content.remove('actions', {
if: isNotTransferParticipant,
});
flex.ParticipantCanvas.Content.add(
<ParticipantActionsButtons key="custom-actions" />,
{ sortOrder: 10, if: isNotTransferParticipant }
);
flex.ParticipantCanvas.Content.remove('name', { if: isUnknownParticipant });
flex.ParticipantCanvas.Content.add(<ParticipantName key="custom-name" />, {
sortOrder: 1,
if: isUnknownParticipant,
});