|
|
|
@ -167,7 +167,7 @@ const ChatPage = ({ |
|
|
|
|
messages.map((message) => ( |
|
|
|
|
<div className={`w-full p-5 flex ${message.userId == user.id && 'rtl'}`}> |
|
|
|
|
{message.userId == contact.id && <img src={message.userId == contact.id ? contact.avatar : user.avatar} className={`w-12 h-12 rounded-full ${message.userId == user.id ? 'ml-2' : 'mr-2'}`}/>} |
|
|
|
|
<div className={`${message.userId == user.id ? 'bg-blue-200 text-gray-500 text-sm rounded-tr-none' : 'bg-blue-400 text-gray-100 text-sm rounded-tl-none'} p-3 rounded-xl text-right flex flex-col `}> |
|
|
|
|
<div className={`${message.userId == user.id ? 'bg-blue-200 text-gray-500 text-sm rounded-tr-none' : 'bg-blue-400 text-gray-100 text-sm rounded-tl-none'} p-3 rounded-xl text-right flex flex-col `} style={{maxWidth: '50%'}}> |
|
|
|
|
<p>{message.value}</p> |
|
|
|
|
<div className={` mt-2 w-full flex items-center ${message.userId == user.id ?'justify-end' : 'justify-start'} text-xs`}> |
|
|
|
|
{ |
|
|
|
|