diff --git a/web/chat/message-preview.react.js b/web/chat/message-preview.react.js
--- a/web/chat/message-preview.react.js
+++ b/web/chat/message-preview.react.js
@@ -25,6 +25,8 @@
const { messageInfo: messageInfoProps, threadInfo } = props;
const { unread } = threadInfo.currentUser;
+ const colorStyle = unread ? css.white : css.light;
+
if (!messageInfoProps) {
return (
@@ -36,6 +38,7 @@
messageInfoProps.type === messageTypes.SIDEBAR_SOURCE
? messageInfoProps.sourceMessage
: messageInfoProps;
+
const messageTitle = getMessageTitle(
messageInfo,
threadInfo,
@@ -50,10 +53,8 @@
) {
const userString = stringForUser(messageInfo.creator);
const username = `${userString}: `;
- const usernameStyle = unread ? css.white : css.light;
- usernameText =
{username};
+ usernameText =
{username};
}
- const colorStyle = unread ? css.white : css.light;
return (
{usernameText}
@@ -61,7 +62,6 @@
);
} else {
- const colorStyle = unread ? css.white : css.light;
return (
{messageTitle}