Some checks failed
E2E / Playwright e2e (push) Has been cancelled
Move mail, compose, contacts, and accounts off mocks onto REST + WS. Add client, auth store, IDB-backed query cache, offline queue, and sync bar; hybrid Zustand for UI-only state. Settings still local until backend has preferences API.
11 lines
354 B
TypeScript
11 lines
354 B
TypeScript
'use client'
|
|
|
|
import { useContacts } from '@/lib/api/hooks/use-contact-queries'
|
|
import { apiContactToFullContact } from '@/lib/api/adapters'
|
|
|
|
export function useContactsList(bookId?: string) {
|
|
const { data: apiContacts, ...rest } = useContacts(bookId)
|
|
const contacts = apiContacts?.map(apiContactToFullContact) ?? []
|
|
return { contacts, ...rest }
|
|
}
|