Files
twenty_crm/front/src/modules/companies/table/components/EditableCompanyAccountOwnerCell.tsx
Charles Bochet 6ced8434bd Uniformize folder structure (#693)
* Uniformize folder structure

* Fix icons

* Fix icons

* Fix tests

* Fix tests
2023-07-16 14:29:28 -07:00

27 lines
823 B
TypeScript

import { useRecoilValue } from 'recoil';
import { CompanyAccountOwnerCell } from '@/companies/components/CompanyAccountOwnerCell';
import { companyAccountOwnerFamilyState } from '@/companies/states/companyAccountOwnerFamilyState';
import { useCurrentRowEntityId } from '@/ui/table/hooks/useCurrentEntityId';
export function EditableCompanyAccountOwnerCell() {
const currentRowEntityId = useCurrentRowEntityId();
const accountOwner = useRecoilValue(
companyAccountOwnerFamilyState(currentRowEntityId ?? ''),
);
return (
<CompanyAccountOwnerCell
company={{
id: currentRowEntityId ?? '',
accountOwner: {
avatarUrl: accountOwner?.avatarUrl ?? '',
displayName: accountOwner?.displayName ?? '',
id: accountOwner?.id ?? '',
},
}}
/>
);
}