Reorganize frontend and install Craco to alias modules (#190)

This commit is contained in:
Charles Bochet
2023-06-04 11:23:09 +02:00
committed by GitHub
parent bbc80cd543
commit 7b858fd7c9
149 changed files with 3441 additions and 1158 deletions

View File

@ -0,0 +1,42 @@
import { useOpenCommentRightDrawer } from '@/comments/hooks/useOpenCommentRightDrawer';
import EditableChip from '@/ui/components/editable-cell/EditableChip';
import { getLogoUrlFromDomainName } from '@/utils/utils';
import { Company } from '../interfaces/company.interface';
import { updateCompany } from '../services';
import CompanyChip from './CompanyChip';
type OwnProps = {
company: Company;
};
export function CompanyEditableNameChipCell({ company }: OwnProps) {
const openCommentRightDrawer = useOpenCommentRightDrawer();
function handleCommentClick() {
openCommentRightDrawer([
{
type: 'Company',
id: company.id,
},
]);
}
return (
<EditableChip
value={company.name || ''}
placeholder="Name"
picture={getLogoUrlFromDomainName(company.domainName)}
changeHandler={(value: string) => {
updateCompany({
...company,
name: value,
});
}}
ChipComponent={CompanyChip}
commentCount={12}
onCommentClick={handleCommentClick}
/>
);
}