Feat: Dial section

Still WIP
This commit is contained in:
Taso committed 2021-01-18 14:30:32 -05:00
1 parent 5a9707ae3c
commit d6e9a85b40
8 files changed
+221 -4

No files matched your search

@@ -0,0 +1,24 @@
import React from 'react';
import ListItemText from '@material-ui/core/ListItemText';
import PhoneCallbackIcon from '@material-ui/icons/PhoneCallback';
import PhoneForwardedIcon from '@material-ui/icons/PhoneForwarded';
import { List } from '../../../../ui/components/List';
import { ListItem } from '../../../../ui/components/ListItem';
const CallTypeIcon = {
incoming: <PhoneCallbackIcon />,
outgoing: <PhoneForwardedIcon />,
};
export const DialerHistory = ({ calls }) => {
return (
<List disablePadding>
{calls.map((call) => (
<ListItem key={call.id} divider button>
<ListItemText primary={call.caller} secondary={call.phoneNumber} />
{CallTypeIcon[call.type]}
</ListItem>
))}
</List>
);
};