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:
@@ -58,7 +58,7 @@ interface MessageThreadProps {
|
|||||||
readOnly: boolean;
|
readOnly: boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
function MessageThread({ sessionId, readOnly }: MessageThreadProps) {
|
function MessageThread({ sessionId, readOnly: _readOnly }: MessageThreadProps) {
|
||||||
const [businessName, setBusinessName] = useState<string>("Business");
|
const [businessName, setBusinessName] = useState<string>("Business");
|
||||||
|
|
||||||
const { conversation, loading: convLoading, error: convError } = useConversation(sessionId);
|
const { conversation, loading: convLoading, error: convError } = useConversation(sessionId);
|
||||||
@@ -144,7 +144,6 @@ function MessageThread({ sessionId, readOnly }: MessageThreadProps) {
|
|||||||
) : (
|
) : (
|
||||||
messages.map((msg: ApiMessage) => {
|
messages.map((msg: ApiMessage) => {
|
||||||
const sender = msg.direction === "inbound" ? "customer" : "business";
|
const sender = msg.direction === "inbound" ? "customer" : "business";
|
||||||
const senderName = sender === "customer" ? "You" : businessName;
|
|
||||||
return (
|
return (
|
||||||
<div key={msg.id} className={`flex ${sender === "customer" ? "justify-end" : "justify-start"}`}>
|
<div key={msg.id} className={`flex ${sender === "customer" ? "justify-end" : "justify-start"}`}>
|
||||||
<div className={`max-w-[80%] rounded-2xl px-4 py-2.5 ${
|
<div className={`max-w-[80%] rounded-2xl px-4 py-2.5 ${
|
||||||
|
|||||||
Reference in New Issue
Block a user