mirror of
https://github.com/arc53/DocsGPT.git
synced 2025-11-29 08:33:20 +00:00
adds conversation slice and acomoddates conversation component with the
data types
This commit is contained in:
@@ -1,24 +1,23 @@
|
||||
import Avatar from '../Avatar';
|
||||
import { User } from '../models/misc';
|
||||
import { MESSAGE_TYPE } from './conversationModels';
|
||||
|
||||
export default function ConversationBubble({
|
||||
user,
|
||||
message,
|
||||
isCurrentUser,
|
||||
type,
|
||||
className,
|
||||
}: {
|
||||
user: User;
|
||||
message: string;
|
||||
isCurrentUser: boolean;
|
||||
type: MESSAGE_TYPE;
|
||||
className: string;
|
||||
}) {
|
||||
return (
|
||||
<div
|
||||
className={`flex rounded-3xl ${
|
||||
isCurrentUser ? '' : 'bg-gray-1000'
|
||||
type === 'QUESTION' ? '' : 'bg-gray-1000'
|
||||
} py-7 px-5 ${className}`}
|
||||
>
|
||||
<Avatar avatar={user.avatar}></Avatar>
|
||||
<Avatar avatar={type === 'QUESTION' ? '👤' : '🦖'}></Avatar>
|
||||
<p className="ml-5">{message}</p>
|
||||
</div>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user