diff --git a/web/chat/sidebar-item.react.js b/web/chat/sidebar-item.react.js index f08337994..a0193f713 100644 --- a/web/chat/sidebar-item.react.js +++ b/web/chat/sidebar-item.react.js @@ -1,49 +1,35 @@ // @flow import classNames from 'classnames'; import * as React from 'react'; import type { SidebarInfo } from 'lib/types/thread-types'; -import { shortAbsoluteDate } from 'lib/utils/date-utils'; -import { useSelector } from '../redux/redux-utils'; import { useOnClickThread } from '../selectors/nav-selectors'; import SWMansionIcon from '../SWMansionIcon.react'; import css from './chat-thread-list.css'; type Props = { +sidebarInfo: SidebarInfo, }; function SidebarItem(props: Props): React.Node { - const { threadInfo, lastUpdatedTime } = props.sidebarInfo; + const { threadInfo } = props.sidebarInfo; const threadID = threadInfo.id; - const onClick = useOnClickThread(threadID); - - const timeZone = useSelector(state => state.timeZone); - const lastActivity = shortAbsoluteDate(lastUpdatedTime, timeZone); - const { unread } = threadInfo.currentUser; const unreadCls = classNames(css.sidebarTitle, { [css.unread]: unread }); + return ( <>
{threadInfo.uiName}
-
- {lastActivity} -
); } export default SidebarItem;