Skip to content

Commit

Permalink
modify time appearance
Browse files Browse the repository at this point in the history
  • Loading branch information
sevelinCa committed Jul 26, 2024
1 parent 562e587 commit e94cdf4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Components/chat/ChatPlace.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ const ChatPlace = ({ selectedUser }: { selectedUser: any }) => {
<div className={`p-2 mb-2 min-w-[100px] flex flex-col max-w-[500px] rounded-[6px] ${message.sender === myId ? "ml-auto bg-primary" : "mr-auto bg-gray-50"}`}>

<span className={`text-[14px] font-outfit ${message.sender === myId ? "text-white" : ""}`}>{message?.content}</span>
<span className={`text-[12px] font-outfit ${message.sender === myId ? "text-end text-white/40" : " opacity-70"}`}>{new Date(message.createdAt).getHours() + ":" + new Date(message.createdAt).getMinutes()}</span>
<span className={`text-[12px] font-outfit ${message.sender === myId ? "text-end text-white" : " opacity-70"}`}>{new Date(message.createdAt).getHours() + ":" + new Date(message.createdAt).getMinutes()}</span>

</div>
) : (
Expand All @@ -179,7 +179,7 @@ const ChatPlace = ({ selectedUser }: { selectedUser: any }) => {
<LazyLoadImage src={message.imageUrl[0]} className='w-full h-full object-cover rounded-[4px]' />
</div>
<span className={` p-1 text-[14px] font-outfit ${message.sender === myId ? "text-black" : ""}`}>{message?.content}</span>
<span className={` px-1 text-[12px] font-outfit ${message.sender === myId ? "text-end text-primary" : " opacity-70"}`}>{new Date(message.createdAt).getHours() + ":" + new Date(message.createdAt).getMinutes()}</span>
<span className={` px-1 text-[12px] font-outfit ${message.sender === myId ? "text-end text-white" : " opacity-70"}`}>{new Date(message.createdAt).getHours() + ":" + new Date(message.createdAt).getMinutes()}</span>

</div>
)}
Expand Down

0 comments on commit e94cdf4

Please sign in to comment.