2394-feat(front): create new record on click of plus icon (#2660)
* 2394-feat(front): create new record on click of plus icon * 2394-feat(front): fix of Icon Button * 2394-fix: PR fixes --------- Co-authored-by: Charles Bochet <charles@twenty.com>
This commit is contained in:
@ -1,10 +1,10 @@
|
||||
import { Attachment } from '@/activities/files/types/Attachment';
|
||||
import { useFindManyObjectRecords } from '@/object-record/hooks/useFindManyObjectRecords';
|
||||
import { useFindManyRecords } from '@/object-record/hooks/useFindManyRecords';
|
||||
|
||||
import { ActivityTargetableEntity } from '../../types/ActivityTargetableEntity';
|
||||
|
||||
export const useAttachments = (entity: ActivityTargetableEntity) => {
|
||||
const { objects: attachments } = useFindManyObjectRecords({
|
||||
const { records: attachments } = useFindManyRecords({
|
||||
objectNamePlural: 'attachments',
|
||||
filter: {
|
||||
[entity.type === 'Company' ? 'companyId' : 'personId']: { eq: entity.id },
|
||||
|
||||
Reference in New Issue
Block a user