mirror of
https://github.com/darksaid98/new-phone-who-dis.git
synced 2026-12-04 14:38:45 +00:00
25 lines
733 B
TypeScript
25 lines
733 B
TypeScript
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>
|
|
{calls.map((call) => (
|
|
<ListItem key={call.id} divider>
|
|
<ListItemText primary={call.caller} secondary={call.phoneNumber} />
|
|
{CallTypeIcon[call.type]}
|
|
</ListItem>
|
|
))}
|
|
</List>
|
|
);
|
|
};
|