import React from 'react'; import { useSelector } from 'react-redux'; import { getConversationsCount } from '../state/selectors/conversations'; import { SessionIconButton } from './icon'; type Props = { searchString: string; onChange: any; placeholder: string; }; export const SessionSearchInput = (props: Props) => { const { searchString, onChange, placeholder } = props; const convoCount = useSelector(getConversationsCount); // just after onboard we only have a conversation with ourself if (convoCount <= 1) { return null; } return (
onChange(e.target.value)} placeholder={placeholder} />
); };