Skip to content

Commit

Permalink
removed commented code
Browse files Browse the repository at this point in the history
  • Loading branch information
Swetha-Baskaran committed Dec 16, 2023
1 parent 2180342 commit baa0c67
Showing 1 changed file with 0 additions and 83 deletions.
83 changes: 0 additions & 83 deletions src/components/CommunityChat/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -410,89 +410,6 @@ const ChatBox = () => {
))}
</React.Fragment>
))}

{/* correct code */}
{console.log("msgs", messages)}
{/* {messages.map((message) => (
<li
key={message.id}
className={`chat-message ${
user?.uid == message.uid ? "current-user-msg" : ""
}`}
>
<img
src={message.photoURL || profileAvatar}
alt={message.displayName}
className={"chat-user-img"}
onClick={() => goToUserProfile(message.uid)}
/>
<div className="chat-msg-text">
<span className="name-and-date-container">
<h5
className="chat-msg-sender-name"
onClick={() => goToUserProfile(message.uid)}
>
{user?.uid === message?.uid
? "You"
: message.displayName}
</h5>
<span className="time-reaction-container">
<h6 className="message-time">
{getTime(message?.createdAt?.seconds)}
</h6>
<Reaction
message={message}
userUid={message.uid}
currentUid={user.uid}
/>
{user.uid === message.uid && (
<span className="flex-center message-options">
<OptionIcon
onClick={() => {
setOpenOptions(true);
handleOpenOptions(message.id);
}}
/>
{openOptions && openOptions === message.id && (
<ClickAwayListener
onClickAway={() => setOpenOptions(false)}
>
<div className="delete-message-container">
<span
className="delete-option"
onClick={() => handleDeletMsg(message.id)}
>
<DeleteIcon />
Delete
</span>
<span
className="edit-option"
onClick={() => handleEditMsg(message.id)}
>
<EditIcon />
Edit
</span>
</div>
</ClickAwayListener>
)}
</span>
)}
</span>
</span>
<p>{message.text}</p>
{message.edited && (
<div className="edit-state">
<span>Edited</span>
</div>
)}
{message.reaction && (
<ul className="rxn-main-container">
{getReaction(message.reaction)}
</ul>
)}
</div>
</li>
))} */}
</ul>
</div>
)}
Expand Down

0 comments on commit baa0c67

Please sign in to comment.