import React from 'react'; import { Avatar, Box, Typography } from '@material-ui/core'; import { makeStyles } from '@material-ui/core/styles'; import { useContactActions } from '../../../apps/contacts/hooks/useContactActions'; import { useCall } from '../hooks/useCall'; import { useTranslation } from 'react-i18next'; const useStyles = makeStyles({ image: { width: 80, height: 80, }, }); const CallContactContainer = () => { const { t } = useTranslation(); const { call } = useCall(); const classes = useStyles(); const { getDisplayByNumber, getPictureByNumber } = useContactActions(); const getDisplayOrNumber = () => call.isTransmitter ? getDisplayByNumber(call?.receiver) : getDisplayByNumber(call?.transmitter); return ( {call.isTransmitter ? t('CALLS.MESSAGES.OUTGOING').toUpperCase() : t('CALLS.MESSAGES.INCOMING').toUpperCase()} {getDisplayOrNumber()} ); }; export default CallContactContainer;