Page MenuHomePhorge

chat-thread-list-see-more-sidebars.react.js
No OneTemporary

Size
1 KB
Referenced Files
None
Subscribers
None

chat-thread-list-see-more-sidebars.react.js

// @flow
import classNames from 'classnames';
import * as React from 'react';
import type { ThreadInfo } from 'lib/types/thread-types';
import SidebarListModal from '../modals/chat/sidebar-list-modal.react';
import { useModalContext } from '../modals/modal-provider.react';
import css from './chat-thread-list.css';
type Props = {
+threadInfo: ThreadInfo,
+unread: boolean,
+showingSidebarsInline: boolean,
};
function ChatThreadListSeeMoreSidebars(props: Props): React.Node {
const { unread, showingSidebarsInline, threadInfo } = props;
const { setModal } = useModalContext();
const onClick = React.useCallback(
() => setModal(<SidebarListModal threadInfo={threadInfo} />),
[setModal, threadInfo],
);
const buttonText = showingSidebarsInline ? 'See more...' : 'See sidebars...';
return (
<div className={classNames(css.thread, css.sidebar)} onClick={onClick}>
<a className={css.threadButton}>
<div className={css.threadRow}>
<div
className={classNames({
[css.sidebarTitle]: true,
[css.unread]: unread,
})}
>
{buttonText}
</div>
</div>
</a>
</div>
);
}
export default ChatThreadListSeeMoreSidebars;

File Metadata

Mime Type
text/x-java
Expires
Sun, Dec 7, 7:55 AM (3 h, 59 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
5834110
Default Alt Text
chat-thread-list-see-more-sidebars.react.js (1 KB)

Event Timeline