Skip to content

Commit

Permalink
Showing only the most recent error for reaction in callMessage (#199)
Browse files Browse the repository at this point in the history
  • Loading branch information
Mohtasim committed Nov 15, 2023
1 parent 5f7ebb5 commit 86bcb30
Showing 1 changed file with 2 additions and 10 deletions.
12 changes: 2 additions & 10 deletions Project/src/MakeCall/CallCard.js
Original file line number Diff line number Diff line change
Expand Up @@ -667,11 +667,7 @@ export default class CallCard extends React.Component {
// 1:1 direct call with teams user is not supported.
const messageBarText = 'Reaction capability is not allowed for this call type';
console.error(messageBarText);
this.setState(prevState => ({
...prevState,
callMessage: `${prevState.callMessage ? prevState.callMessage + `\n` : ``}
${messageBarText}. \n`
}));
this.setState({ callMessage: messageBarText })
return ;
}

Expand Down Expand Up @@ -704,11 +700,7 @@ export default class CallCard extends React.Component {
// Surface the error
console.error(error);
const messageBarText = JSON.stringify(error);
this.setState(prevState => ({
...prevState,
callMessage: `${prevState.callMessage ? prevState.callMessage + `\n` : ``}
${messageBarText}. \n`
}));
this.setState({ callMessage: messageBarText })
}
}

Expand Down

0 comments on commit 86bcb30

Please sign in to comment.