chatbot / app / components / ui / chat / chat-avatar.tsx
chat-avatar.tsx
Raw
import { User } from "lucide-react";
import Image from "next/image";

export default function ChatAvatar({ role }: { role: string }) {
  if (role === "user") {
    return (
      <div className="flex h-8 w-8 shrink-0 select-none items-center justify-center rounded-md border bg-background shadow">
        <User className="h-4 w-4" />
      </div>
    );
  }

  return (
    <div className="flex h-8 w-8 shrink-0 select-none items-center justify-center rounded-md border bg-black text-white shadow">
      <Image
        className="rounded-md"
        src="/chat.png"
        alt="Creative Logo"
        width={24}
        height={24}
        priority
      />
    </div>
  );
}