mirror of
https://github.com/aljazceru/mutiny-web.git
synced 2026-02-20 21:54:23 +01:00
Sorted contacts on activtiy screen
This commit is contained in:
committed by
Paul Miller
parent
9b36437a87
commit
390f1d6c2d
@@ -29,16 +29,9 @@ function ContactRow() {
|
||||
const [state, _actions] = useMegaStore();
|
||||
const [contacts, { refetch }] = createResource(async () => {
|
||||
try {
|
||||
const contacts = state.mutiny_wallet?.get_contacts();
|
||||
|
||||
// FIXME: this is just types shenanigans I believe
|
||||
const c: Contact[] = [];
|
||||
if (contacts) {
|
||||
for (const contact in contacts) {
|
||||
c.push(contacts[contact]);
|
||||
}
|
||||
}
|
||||
return c || [];
|
||||
const contacts: Contact[] =
|
||||
state.mutiny_wallet?.get_contacts_sorted();
|
||||
return contacts || [];
|
||||
} catch (e) {
|
||||
console.error(e);
|
||||
return [];
|
||||
|
||||
Reference in New Issue
Block a user