mirror of
https://github.com/darksaid98/new-phone-who-dis.git
synced 2026-12-04 06:28:51 +00:00
19 lines
360 B
TypeScript
19 lines
360 B
TypeScript
import { useRecoilValue } from "recoil";
|
|
import { contactsState } from "./state";
|
|
|
|
interface Contact {
|
|
id: string;
|
|
display: string;
|
|
number: string;
|
|
avatar?: string
|
|
}
|
|
|
|
interface IUseContacts {
|
|
contacts: Contact[];
|
|
}
|
|
|
|
export const useContacts = (): IUseContacts => {
|
|
const contacts = useRecoilValue(contactsState.contacts);
|
|
return { contacts };
|
|
};
|