import Button from '@mui/material/Button'; import Avatar from '@mui/material/Avatar'; import { makeStyles } from '@material-ui/core' import { useSelector } from 'react-redux'; import { getChat } from '../../../../../../redux/chat/selector'; import { firstLetter,slicedWord } from '../../../../../../helpers'; const useStyles = makeStyles({ modalDelete: { background: '#ffffff', position: 'absolute', content:'', width: '20%', height:'auto', left: '40%', bottom: '48.5%', borderRadius: 10, padding: 10, display: 'flex', flexDirection:'column' }, overlay: { position: 'fixed', top: 0, left: 0, width: '100vw', height: '100vh', zIndex: 100, backgroundColor: 'rgba(104, 105, 104, 0.6)', overflowY: 'hidden', }, titleWrapper: { display: 'flex', justifyContent: 'flex-start', alignContent: 'center', alignItems:'center' }, }) const DeleteModal = ({setModal}:{setModal:any}) => { const classes = useStyles() const {name,lastName,avatarUrl,color} = useSelector(getChat) const handleDeleteModal = (e: any) => { const id = e.target.id if (id === 'overlay' || id === 'cancel') return setModal(false) if (id === 'deleteForMeAnd') console.log('deleteForMeAnd') if (id === 'deleteForMe') console.log('deleteForMeAnd') } return (
{`${firstLetter(name)}${firstLetter(lastName)}`}

Delete chat

{`Are you sure you want to delete the chat with ${`${firstLetter(name)}${slicedWord(name, 15, 1)} ${firstLetter(lastName)}${slicedWord(lastName, 15, 1)}`}?`}

) } export default DeleteModal