Update company logo fetch api (#161)

This commit is contained in:
Charles Bochet
2023-05-31 11:08:35 +02:00
committed by GitHub
parent ed03111439
commit c0658e1591
5 changed files with 32 additions and 7 deletions
@@ -26,11 +26,9 @@ const StyledInplaceInput = styled.input`
`;
const StyledInplaceShow = styled.div`
width: 100%;
border: none;
outline: none;
padding-left: ${(props) => props.theme.spacing(2)};
padding-right: ${(props) => props.theme.spacing(2)};
display: flex;
padding-left: ${(props) => props.theme.spacing(1)};
padding-right: ${(props) => props.theme.spacing(1)};
&::placeholder {
font-weight: 'bold';
@@ -19,6 +19,7 @@ import { SearchConfigType } from '../../interfaces/search/interface';
import { useState } from 'react';
import { PeopleCompanyCreateCell } from './PeopleCompanyCreateCell';
import { v4 } from 'uuid';
import { getLogoUrlFromDomainName } from '../../services/utils';
export type OwnProps = {
people: Person;
@@ -79,7 +80,7 @@ export function PeopleCompanyCell({ people }: OwnProps) {
chipComponentPropsMapper={(company): CompanyChipPropsType => {
return {
name: company.name || '',
picture: `https://www.google.com/s2/favicons?domain=${company.domainName}&sz=256`,
picture: getLogoUrlFromDomainName(company.domainName),
};
}}
onChange={async (relation) => {