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:
Kanav Arora
2023-11-30 00:37:55 +05:30
committed by GitHub
parent 7e454d2013
commit 976f86093c
9 changed files with 238 additions and 174 deletions

View File

@ -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 },