How to display logos in accordance with the id?

Good day!
There are two tables in the database
the first is "projects"
the second - "company"

First keep a list of projects that the second company that these projects are ordered

PBCgEMZ.png?1

Second, the company name and a link to the logo

BaxKihw.png?1

But when you create the project by selecting the client, you can display all the logos...

zglVPtF.png?1

const onGetCompanyListDetails = () => {
 return projectsList.map(projects => {
 const logoUrl = companyList.find(i => i.id === projects.companyId).imgUrl;
 return <img key={projects.id} src={logoUrl} />
});
 };
April 4th 20 at 13:26
1 answer
April 4th 20 at 13:28
Do better companyName separate endpoint'ohms. Ie
/company/companyName/id,url,imgUrl.

Find more questions by tags React