Skip to content

Commit

Permalink
Merge pull request #1555 from ecency/bugfix/chats-renderer
Browse files Browse the repository at this point in the history
Chats: updated link styles and hidden in submit page
  • Loading branch information
feruzm authored Feb 26, 2024
2 parents 1a4f962 + d841275 commit 92da8b1
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 4 deletions.
5 changes: 5 additions & 0 deletions src/common/features/chats/components/_chat-message-item.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
.chat-message-item-sender {
.markdown-external-link {
@apply text-white opacity-75 hover:opacity-100;
}
}
7 changes: 4 additions & 3 deletions src/common/features/chats/components/chat-message-item.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ import {
} from "@ecency/ns-query";
import { format } from "date-fns";
import { useInViewport } from "react-in-viewport";
import "./_chat-message-item.scss";

interface Props {
type: "sender" | "receiver";
Expand Down Expand Up @@ -94,9 +95,9 @@ export function ChatMessageItem({
<div key={message.id} data-message-id={message.id} ref={ref}>
<div
className={classNameObject({
"flex gap-1 px-4 w-full": true,
"justify-start": type === "receiver",
"justify-end": type === "sender",
"chat-message-item flex gap-1 px-4 w-full": true,
"justify-start chat-message-item-receiver": type === "receiver",
"justify-end chat-message-item-sender": type === "sender",
failed: isFailed,
sending: isSending,
"mb-4": showDate,
Expand Down
6 changes: 5 additions & 1 deletion src/common/features/chats/components/chat-popup/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,11 @@ export const ChatPopUp = () => {

// Show or hide the popup if current pathname was changed or user changed
useEffect(() => {
setShow(!routerLocation.pathname.match("/chats") && !!activeUser);
setShow(
!routerLocation.pathname.match("/chats") &&
!routerLocation.pathname.match("/submit") &&
!!activeUser
);
}, [routerLocation, activeUser]);

useEffect(() => {
Expand Down

0 comments on commit 92da8b1

Please sign in to comment.