I have a lodash/fp map function that returns a component, Lead. It is passed a list of leads (over which I iterate), but I also want to pass an id, that ill pass into each component (same id into each component)
I pass the array and the string into the component:
<tbody>{renderLeads(leads, advisor.id)}</tbody>
and my function returns a mapped array of leads:
const renderLeads = map(({ node: lead }) => { <--- how do i pass advisor.id into this function
return <Lead lead={lead} advisorId={advisorId} key={lead.id} />;
});
How do I add the prop advisor.id (the second argument) into that map?