diff --git a/frontend/src/components/Teams/ChatTeam.tsx b/frontend/src/components/Teams/ChatTeam.tsx index db8c944b..8af93849 100644 --- a/frontend/src/components/Teams/ChatTeam.tsx +++ b/frontend/src/components/Teams/ChatTeam.tsx @@ -84,20 +84,16 @@ const stream = async (id: number, data: TeamChat) => { } const MessageBox = ({ message }: { message: Message }) => { - const memberName = message.member.slice(0, message.member.lastIndexOf("-")) - const nextMemberName = - message.next?.lastIndexOf("-") !== -1 - ? message.next?.slice(0, message.next?.lastIndexOf("-")) - : message.next + const { member, next, content } = message return ( - {memberName} - {nextMemberName && } - {nextMemberName && nextMemberName} + {member} + {next && } + {next && next} - {message.content} + {content} )