👤
{hasStaff ? "Support Agent" : "Leon's Pet Store Support"}
{staffStatusLabel}
{!hasStaff && !hasStaffMessage && !isClosed && (
A support agent will be with you shortly. You can send messages while you wait.
)}
{messages.length === 0 && (
Your conversation has started. A support agent will join soon.
)}
{messages.map((msg) => {
const isOwn = msg.senderId === user.id;
return (
{!isOwn && (
👤
)}
{msg.content && msg.content.split("\n").map((line, i, arr) => (
{line}
{i < arr.length - 1 &&
}
))}
{msg.attachmentUrl && (
)}
{msg.timestamp ? new Date(msg.timestamp).toLocaleTimeString([], { hour: "2-digit", minute: "2-digit" }) : ""}
{isOwn && (
{user.fullName ? user.fullName.charAt(0).toUpperCase() : "U"}
)}
);
})}
{error && (
{error}
)}
{isClosed ? (
This conversation has been closed.
) : (
)}