🐾
Leon's Pet Assistant
Online
{!isEscalated && !isClosed && (
Chat with a Real Person
)}
router.push("/chat")}
title="Go to Live Support"
>
Live Support
{messages.length === 0 && (
🐾
Hello{user.fullName ? `, ${user.fullName.split(" ")[0]}` : ""}! I'm your pet care assistant.
Ask me about pet recommendations, care tips, supplies, or anything pet-related!
)}
{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}
setError(null)}>✕
)}
{isClosed ? (
This conversation has been closed.
Start New Conversation
) : (
)}