From 570d62e4c9ef9ddc7ad1f61305fb2349c9fc556f Mon Sep 17 00:00:00 2001 From: Allison Chiang Date: Thu, 13 Jun 2024 14:40:37 -0700 Subject: [PATCH] improve concatenation --- Project/src/MakeCall/CallCard.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/Project/src/MakeCall/CallCard.js b/Project/src/MakeCall/CallCard.js index 9480496..b0da5ae 100644 --- a/Project/src/MakeCall/CallCard.js +++ b/Project/src/MakeCall/CallCard.js @@ -263,9 +263,12 @@ export default class CallCard extends React.Component { }); this.call.on('mutedByOthers', () => { - const messageBarText = 'Muted by someone else'; + const messageBarText = 'You have been muted by someone else. Unmute to speak.'; console.log(messageBarText); - this.setState({ callMessage: messageBarText }) + this.setState(prevState => ({ + ...prevState, + callMessage: `${prevState.callMessage ? prevState.callMessage + `\n` : ``} ${messageBarText}.` + })); }); const handleParticipant = (participant) => {