import { makeStyles } from '@material-ui/core' import List from '@mui/material/List'; import Stack from '@mui/material/Stack'; import { TChats } from '../../../../../typescript/redux/chats/types'; import RecentItem from './RecentItem'; import ChatItem from './ChatItem'; import AlertInfo from '../../../../reusableComponents/AlertInfo'; const useStyles = makeStyles({ stack: { display: 'flex', justifyContent: 'space-around', paddingTop:20, }, container: { width: '100%', maxHeight: '85vh', overflowY: 'scroll', '&::-webkit-scrollbar': { width: '0.4em' }, '&::-webkit-scrollbar-track': { boxShadow: 'inset 0 0 6px rgba(0,0,0,0.00)', webkitBoxShadow: 'inset 0 0 6px rgba(0,0,0,0.00)', backgroundColor: '#eceeec', }, '&::-webkit-scrollbar-thumb': { backgroundColor: '#ccc8c8', }, "&::-webkit-scrollbar-thumb:focus": { backgroundColor: "#959595", }, "&::-webkit-scrollbar-thumb:active": { backgroundColor: "#959595", }, }, }) interface IChatListRecent { value: string, filteredAndSorted: TChats, handleListItemClick:(companionId:string) => void } const ChatListRecent = ({value,filteredAndSorted,handleListItemClick}:IChatListRecent) => { const classes = useStyles() return ( <> {!value && filteredAndSorted.length > 0 && {filteredAndSorted.slice(0, 6).map((chat) => )} } {value && filteredAndSorted.length > 0 && {filteredAndSorted.map((chat) => )} } {value && filteredAndSorted.length === 0 && } {!value && filteredAndSorted.length === 0 &&} ) } export default ChatListRecent