- Created a .cursorignore file to manage local environment files. - Updated .env.example to reflect changes in the public app URL. - Modified the gmail workspace configuration to include the drive-suite path. - Enhanced email view components to support attachment handling and fallback for plain text bodies. - Improved user experience by updating attachment display logic and integrating inline attachment support.
20 lines
589 B
TypeScript
20 lines
589 B
TypeScript
'use client'
|
|
|
|
import { useMemo } from 'react'
|
|
import {
|
|
useContacts,
|
|
useDefaultContactBookId,
|
|
} from '@/lib/api/hooks/use-contact-queries'
|
|
import { apiContactToFullContact } from '@/lib/api/adapters'
|
|
|
|
export function useContactsList(bookId?: string) {
|
|
const defaultBookId = useDefaultContactBookId()
|
|
const resolvedBookId = bookId ?? defaultBookId
|
|
const { data: apiContacts, ...rest } = useContacts(resolvedBookId)
|
|
const contacts = useMemo(
|
|
() => apiContacts?.map(apiContactToFullContact) ?? [],
|
|
[apiContacts]
|
|
)
|
|
return { contacts, bookId: resolvedBookId, ...rest }
|
|
}
|