mirror of
https://github.com/darksaid98/new-phone-who-dis.git
synced 2026-12-04 22:16:40 +00:00
Feat(PhoneApp): PhoneList
This commit is contained in:
1 parent
863f908f05
commit
00856fe87a
1 file changed
+24
@@ -0,0 +1,24 @@
|
|||||||
|
import React from 'react';
|
||||||
|
import List from "@material-ui/core/List";
|
||||||
|
import ListItem from "@material-ui/core/ListItem";
|
||||||
|
import ListItemText from "@material-ui/core/ListItemText";
|
||||||
|
import PhoneCallbackIcon from '@material-ui/icons/PhoneCallback';
|
||||||
|
import PhoneForwardedIcon from '@material-ui/icons/PhoneForwarded';
|
||||||
|
|
||||||
|
export const PhoneList = ({ calls }) => {
|
||||||
|
const CallTypeIcon = {'incoming': <PhoneCallbackIcon />, 'outgoing': <PhoneForwardedIcon />}
|
||||||
|
|
||||||
|
return (
|
||||||
|
<List>
|
||||||
|
{calls.map((call) => (
|
||||||
|
<ListItem key={call.id} divider>
|
||||||
|
<ListItemText
|
||||||
|
primary={call.caller}
|
||||||
|
secondary={call.phoneNumber}
|
||||||
|
/>
|
||||||
|
{CallTypeIcon[call.type]}
|
||||||
|
</ListItem>
|
||||||
|
))}
|
||||||
|
</List>
|
||||||
|
)
|
||||||
|
}
|
||||||
Reference in new issue
Block a user