/** * @author Tanya Vykliuk */ import React from 'react'; // @ts-ignore import styles from './SimpleModal.module.scss'; import Dialog from '@material-ui/core/Dialog'; import DialogTitle from '@material-ui/core/DialogTitle'; import CreatorAsTitle from '../CreatorAsTitle'; import { useTranslation } from 'react-i18next'; interface Props{ onClose : any, selectedValue?: any, open?: boolean; list:any[]; type?: string; } const SimpleModal = (props: Props) : any => { const {onClose, selectedValue, open, list, type } = props; const { t } = useTranslation(); const handleClose = () => { onClose(selectedValue); }; const renderListTitle = () =>{ switch (type){ case 'feed-fires': case 'comment-fires': return (list ? list?.length : '0') + t('social:simpleModal.flames'); case 'followers': return (list ? list?.length : '0') + t('social:simpleModal.followers'); case 'following': return (list ? list?.length : '0') + t('social:simpleModal.following'); default: return ''; } }; return {renderListTitle()} {list?.length>0 ? list?.map((creator, creatorIndex)=>) :

{t('social:simpleModal.emptyList')}

}
; }; export default (SimpleModal);