Highlight messages we jump to.

This commit is contained in:
Paul
2021-07-09 09:58:38 +01:00
parent 362e7452fe
commit 7a5ace2def
5 changed files with 31 additions and 5 deletions

View File

@@ -28,6 +28,7 @@ import MessageEditor from "./MessageEditor";
interface Props {
id: string;
state: RenderState;
highlight?: string;
queue: QueuedMessage[];
}
@@ -42,7 +43,7 @@ const BlockedMessage = styled.div`
}
`;
function MessageRenderer({ id, state, queue }: Props) {
function MessageRenderer({ id, state, queue, highlight }: Props) {
if (state.type !== "RENDER") return null;
const client = useContext(AppContext);
@@ -132,6 +133,7 @@ function MessageRenderer({ id, state, queue }: Props) {
key={message._id}
message={message}
attachContext
highlight={highlight === message._id}
/>,
);
} else {
@@ -158,6 +160,7 @@ function MessageRenderer({ id, state, queue }: Props) {
) : undefined
}
attachContext
highlight={highlight === message._id}
/>,
);
}