fix(GRO-1241): remove unused readOnly and senderName in Communication.tsx

- Rename readOnly to _readOnly in MessageThread destructuring
  (satisfies ESLint no-unused-vars rule)
- Remove unused senderName variable in messages map

Co-Authored-By: Paperclip <noreply@paperclip.ing>
This commit is contained in:
2026-05-14 15:26:03 +00:00
committed by Flea Flicker [agent]
parent 537b5cb0b3
commit aae11c0c4d
@@ -58,7 +58,7 @@ interface MessageThreadProps {
readOnly: boolean;
}
function MessageThread({ sessionId, readOnly }: MessageThreadProps) {
function MessageThread({ sessionId, readOnly: _readOnly }: MessageThreadProps) {
const [businessName, setBusinessName] = useState<string>("Business");
const { conversation, loading: convLoading, error: convError } = useConversation(sessionId);
@@ -144,7 +144,6 @@ function MessageThread({ sessionId, readOnly }: MessageThreadProps) {
) : (
messages.map((msg: ApiMessage) => {
const sender = msg.direction === "inbound" ? "customer" : "business";
const senderName = sender === "customer" ? "You" : businessName;
return (
<div key={msg.id} className={`flex ${sender === "customer" ? "justify-end" : "justify-start"}`}>
<div className={`max-w-[80%] rounded-2xl px-4 py-2.5 ${