From a7100f16a9bca0ec4383b920c25dd71ed9b0c525 Mon Sep 17 00:00:00 2001 From: Christopher Date: Thu, 14 Jan 2021 19:32:56 +0100 Subject: [PATCH] fix(contacts/nui): interface for useContacts --- phone/src/apps/contacts/hooks/useContacts.ts | 10 +++------- phone/src/common/typings/contact.ts | 7 +++++++ 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/phone/src/apps/contacts/hooks/useContacts.ts b/phone/src/apps/contacts/hooks/useContacts.ts index b52fc7e..b70317e 100644 --- a/phone/src/apps/contacts/hooks/useContacts.ts +++ b/phone/src/apps/contacts/hooks/useContacts.ts @@ -1,15 +1,11 @@ import { useRecoilValue } from "recoil"; import { contactsState } from "./state"; -interface Contact { - id: string; - display: string; - number: string; - avatar?: string -} +import { ContactProps } from '../../../common/typings/contact'; interface IUseContacts { - contacts: Contact[]; + contacts: ContactProps[] + } export const useContacts = (): IUseContacts => { diff --git a/phone/src/common/typings/contact.ts b/phone/src/common/typings/contact.ts index 805b1c5..f085d32 100644 --- a/phone/src/common/typings/contact.ts +++ b/phone/src/common/typings/contact.ts @@ -10,3 +10,10 @@ export interface IContactAlert { alert: AlertCategory; setAlert: (type: string) => void; } + +export interface ContactProps { + id: string; + display: string; + number: string; + avatar?: string +} \ No newline at end of file