Closed Loganwebb1994 closed 3 years ago
return (
<div className="standList">
{
stands.map(stand => { let notesForStand = userStands.filter(userStand => userStand.standId === stand.id )
{console.log(notesForStand, "standNote")}
return <StandCard key={stand.id} stand={stand} relationship={notesForStand} />
})
}
</div>
)
}
updated code, still not working. My filter isnt returning anything
My issue was that I was trying to pass in an array of multiple objects as an argument. Once I mapped through that array and accessed the individual objects the notes rendered.
Ticket MUST be completed before getting help from an instructor
Name: Logan
Breakout Room: The Hackery
Have you searched the other issue tickets? If not, do that first.
REQUIRED Add Tags to Issue Ticket and Assign to Project Board
c46 Help-Thread
project boardBlocker
label if this is stoping you from moving forwardREQUIRED Describe your issue:
REQUIRED Copy/paste any error messages that appear:
REQUIRED What have you googled? (You must have at least 3 links related to your issue)
REQUIRED: What have you tried? Tell us everything you have tried.
REQUIRED: Copy/paste link TO THE FILE on your branch that you are having issues with
https://github.com/Loganwebb1994/oh-deer/blob/LW-notes-addNote/src/components/stands/StandList.js
Code Snippet