diff --git a/web/modals/threads/thread-picker-modal.css b/web/modals/threads/thread-picker-modal.css index 073b8d5b4..dc5e9c714 100644 --- a/web/modals/threads/thread-picker-modal.css +++ b/web/modals/threads/thread-picker-modal.css @@ -1,45 +1,39 @@ div.container { display: flex; flex-direction: column; overflow: hidden; margin: 16px; } div.contentContainer { overflow: scroll; height: 448px; } div.threadPickerOptionContainer { display: flex; } .threadPickerOptionButton { flex: 1; justify-content: left; padding: 12px 16px; font-size: var(--m-font-16); } .threadPickerOptionButton:hover { background-color: var(--thread-hover-bg); border-radius: 8px; } -div.threadSplotch { - min-width: 40px; - height: 40px; - border-radius: 10px; -} - div.threadNameText { color: var(--shades-white-100); margin-left: 16px; } div.noResultsText { text-align: center; color: var(--shades-white-100); margin-top: 24px; font-weight: 500; } diff --git a/web/modals/threads/thread-picker-modal.react.js b/web/modals/threads/thread-picker-modal.react.js index 651ca36b7..4f658649e 100644 --- a/web/modals/threads/thread-picker-modal.react.js +++ b/web/modals/threads/thread-picker-modal.react.js @@ -1,145 +1,140 @@ // @flow import invariant from 'invariant'; import * as React from 'react'; import { createSelector } from 'reselect'; import { useGlobalThreadSearchIndex } from 'lib/selectors/nav-selectors.js'; import { onScreenEntryEditableThreadInfos } from 'lib/selectors/thread-selectors.js'; import type { ThreadInfo } from 'lib/types/thread-types.js'; import { useResolvedThreadInfo } from 'lib/utils/entity-helpers.js'; import css from './thread-picker-modal.css'; import Button from '../../components/button.react.js'; import Search from '../../components/search.react.js'; +import ThreadAvatar from '../../components/thread-avatar.react.js'; import { useSelector } from '../../redux/redux-utils.js'; import Modal, { type ModalOverridableProps } from '../modal.react.js'; type OptionProps = { +threadInfo: ThreadInfo, +createNewEntry: (threadID: string) => void, +onCloseModal: () => void, }; function ThreadPickerOption(props: OptionProps) { const { threadInfo, createNewEntry, onCloseModal } = props; const onClickThreadOption = React.useCallback(() => { createNewEntry(threadInfo.id); onCloseModal(); }, [threadInfo.id, createNewEntry, onCloseModal]); - const splotchColorStyle = React.useMemo( - () => ({ - backgroundColor: `#${threadInfo.color}`, - }), - [threadInfo.color], - ); - const { uiName } = useResolvedThreadInfo(threadInfo); + return (