diff --git a/src/renderer/src/@types/i18next-resources.d.ts b/src/renderer/src/@types/i18next-resources.d.ts index d940f045..d5bf5fe5 100644 --- a/src/renderer/src/@types/i18next-resources.d.ts +++ b/src/renderer/src/@types/i18next-resources.d.ts @@ -830,6 +830,7 @@ interface Resources { } contacts: { title: 'Contacts' + listTitle: 'All contacts' buttonAddContactLabel: 'Add Contact' contactList: { contacts: 'CONTACTS' diff --git a/src/renderer/src/components/Contact/ContactList.tsx b/src/renderer/src/components/Contact/ContactList.tsx index 1f46aac6..d19b7930 100644 --- a/src/renderer/src/components/Contact/ContactList.tsx +++ b/src/renderer/src/components/Contact/ContactList.tsx @@ -133,7 +133,7 @@ export const ContactList = ({ return ( -
+
setSearch(event.target.value)} compacted />
diff --git a/src/renderer/src/locales/en/pages.json b/src/renderer/src/locales/en/pages.json index b0bb0aca..e8f78dc3 100644 --- a/src/renderer/src/locales/en/pages.json +++ b/src/renderer/src/locales/en/pages.json @@ -178,6 +178,7 @@ }, "contacts": { "title": "Contacts", + "listTitle": "All contacts", "buttonAddContactLabel": "Add Contact", "contactList": { "contacts": "CONTACTS", diff --git a/src/renderer/src/routes/pages/Contacts/ContactsTabContent.tsx b/src/renderer/src/routes/pages/Contacts/ContactsTabContent.tsx deleted file mode 100644 index 8a51d8aa..00000000 --- a/src/renderer/src/routes/pages/Contacts/ContactsTabContent.tsx +++ /dev/null @@ -1,10 +0,0 @@ -import { IContactState } from '@renderer/@types/store' -import { ContactList } from '@renderer/components/Contact/ContactList' - -type TProps = { - onContactSelected?: (contact: IContactState | null) => void -} - -export const ContactsTabContent = ({ onContactSelected }: TProps) => { - return -} diff --git a/src/renderer/src/routes/pages/Contacts/index.tsx b/src/renderer/src/routes/pages/Contacts/index.tsx index 7fc5d956..db35ba4a 100644 --- a/src/renderer/src/routes/pages/Contacts/index.tsx +++ b/src/renderer/src/routes/pages/Contacts/index.tsx @@ -4,21 +4,14 @@ import { TbPencil, TbPlus } from 'react-icons/tb' import { IContactState } from '@renderer/@types/store' import { Button } from '@renderer/components/Button' import { ContactAddressTable } from '@renderer/components/Contact/ContactAddressTable' +import { ContactList } from '@renderer/components/Contact/ContactList' import { IconButton } from '@renderer/components/IconButton' import { Separator } from '@renderer/components/Separator' -import { Tabs } from '@renderer/components/Tabs' import { StringHelper } from '@renderer/helpers/StringHelper' import { useContactsSelector } from '@renderer/hooks/useContactSelector' import { useModalNavigate } from '@renderer/hooks/useModalRouter' import { MainLayout } from '@renderer/layouts/Main' -import { ContactsTabContent } from './ContactsTabContent' - -enum ESidebarOption { - CONTACTS = 'CONTACTS', - MY_ACCOUNTS = 'MY_ACCOUNTS', -} - export const ContactsPage = () => { const { t } = useTranslation('pages', { keyPrefix: 'contacts' }) const { t: commonGeneral } = useTranslation('common', { keyPrefix: 'general' }) @@ -41,27 +34,19 @@ export const ContactsPage = () => { } >
-
- - - - {t('contactList.contacts')} - - - {t('contactList.myAccounts')} - - +
+
+ {t('listTitle')} + +
- - - - +
{selectedContact && ( -
+
-
+
{StringHelper.truncateStringMiddle(selectedContact.name, 70)}