mirror of
https://github.com/darksaid98/new-phone-who-dis.git
synced 2026-12-04 22:16:40 +00:00
formatting
This commit is contained in:
1 parent
e48263838f
commit
3a1bd75f97
23 files changed
+309
-236
No files matched your search
@@ -1,15 +1,11 @@
|
||||
import React from "react";
|
||||
import ListItemText from "@material-ui/core/ListItemText";
|
||||
import {
|
||||
Button,
|
||||
ListItemAvatar,
|
||||
Avatar as MuiAvatar
|
||||
} from "@material-ui/core";
|
||||
import { Button, ListItemAvatar, Avatar as MuiAvatar } from "@material-ui/core";
|
||||
|
||||
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
|
||||
import { faPen } from "@fortawesome/free-solid-svg-icons";
|
||||
|
||||
import { useFilteredContacts } from '../../hooks/useFilteredContacts';
|
||||
import { useFilteredContacts } from "../../hooks/useFilteredContacts";
|
||||
|
||||
import PhoneIcon from "@material-ui/icons/Phone";
|
||||
import ChatIcon from "@material-ui/icons/Chat";
|
||||
@@ -20,7 +16,6 @@ import { useContacts } from "../../hooks/useContacts";
|
||||
import Nui from "../../../../os/nui-events/utils/Nui";
|
||||
|
||||
export const ContactList = () => {
|
||||
|
||||
const { filteredContacts } = useFilteredContacts();
|
||||
|
||||
const contacts = useContacts();
|
||||
@@ -34,31 +29,40 @@ export const ContactList = () => {
|
||||
|
||||
return (
|
||||
<List>
|
||||
{contacts.contacts.filter(contact => contact.display.includes(filteredContacts) || contact.number.includes(filteredContacts)).map((contact) => (
|
||||
<ListItem key={contact.id} divider>
|
||||
<ListItemAvatar>
|
||||
{contact.avatar ? (
|
||||
<MuiAvatar src={contact.avatar} />
|
||||
): (
|
||||
<MuiAvatar>{contact.display.slice(0, 1)}</MuiAvatar>
|
||||
)}
|
||||
</ListItemAvatar>
|
||||
<ListItemText primary={contact.display} secondary={contact.number} />
|
||||
<Button onClick={() => startCall(contact.number)}>
|
||||
<PhoneIcon />
|
||||
</Button>
|
||||
<Button
|
||||
onClick={() =>
|
||||
console.log("Message: " + contact.display, contact.number)
|
||||
}
|
||||
>
|
||||
<ChatIcon />
|
||||
</Button>
|
||||
<Button>
|
||||
<FontAwesomeIcon icon={faPen} size="lg"/>
|
||||
</Button>
|
||||
</ListItem>
|
||||
))}
|
||||
{contacts.contacts
|
||||
.filter(
|
||||
(contact) =>
|
||||
contact.display.includes(filteredContacts) ||
|
||||
contact.number.includes(filteredContacts)
|
||||
)
|
||||
.map((contact) => (
|
||||
<ListItem key={contact.id} divider>
|
||||
<ListItemAvatar>
|
||||
{contact.avatar ? (
|
||||
<MuiAvatar src={contact.avatar} />
|
||||
) : (
|
||||
<MuiAvatar>{contact.display.slice(0, 1)}</MuiAvatar>
|
||||
)}
|
||||
</ListItemAvatar>
|
||||
<ListItemText
|
||||
primary={contact.display}
|
||||
secondary={contact.number}
|
||||
/>
|
||||
<Button onClick={() => startCall(contact.number)}>
|
||||
<PhoneIcon />
|
||||
</Button>
|
||||
<Button
|
||||
onClick={() =>
|
||||
console.log("Message: " + contact.display, contact.number)
|
||||
}
|
||||
>
|
||||
<ChatIcon />
|
||||
</Button>
|
||||
<Button>
|
||||
<FontAwesomeIcon icon={faPen} size="lg" />
|
||||
</Button>
|
||||
</ListItem>
|
||||
))}
|
||||
</List>
|
||||
);
|
||||
};
|
||||
Reference in new issue
Block a user