Skip to content

Commit

Permalink
Add user's name on chat (#967)
Browse files Browse the repository at this point in the history
Co-authored-by: Narayan soni <narayansoni854@gmail.com>
  • Loading branch information
Palakkgoyal and narayan954 committed Jul 25, 2023
1 parent 3fc1d4a commit 42c5cce
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 1 deletion.
10 changes: 10 additions & 0 deletions src/components/CommunityChat/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,16 @@
box-shadow: 1px 1px 5px #59afc7;
}

.chat-msg-sender-name {
margin-bottom: 3px;
color: #59afc7;
cursor: pointer;
}

.chat-msg-sender-name:hover {
text-decoration: underline;
}

.current-user-msg > img {
align-self: flex-start;
}
Expand Down
9 changes: 8 additions & 1 deletion src/components/CommunityChat/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,14 @@ const ChatBox = () => {
className={"chat-user-img"}
onClick={() => goToUserProfile(message.uid)}
/>
<p className="chat-msg-text">{message.text}</p>
<div className="chat-msg-text">
<h5
className="chat-msg-sender-name"
onClick={() => goToUserProfile(message.uid)}>
{message.displayName}
</h5>
<p>{message.text}</p>
</div>
</li>
))}
</ul>
Expand Down

0 comments on commit 42c5cce

Please sign in to comment.