Closed EricCSheppard closed 1 year ago
The prop for comment on the ShowComment component is comments
but you're referring to it inside the component as comment
, change the prop name to the singular comment
Oops, that was a typo leftover from when I was changing things around, the error still exists when it's comment.
heading for lunch now so might be slow to reply if you get back.
Weird, I'll take a look after lunch
Solved!
Renamed component + Github weirdness was causing this issue. Making a new component with the same exact parts fixed the prob
Describe the bug A clear and concise description of what the bug is.
Getting an error when trying to display the comments subdoc
What is the problem you are trying to solve?
trying to get our comments to display on our show page for an individual document
Expected behavior A clear and concise description of what you expected to happen.
Expecting to map over the array of comments on our document, and have them display below
What is the actual behavior? A clear and concise description of what actually happened.
An error is returned in the console.
Post any code you think might be relevant (one fenced block per file)
The comment map:
The ShowComment component:
What is your best guess as to the source of the problem?
The error says there is something wrong with the casing of the react component
What things have you already tried to solve the problem?
I tried console logging the "commentCard" and this was returned:
Additional context Add any other context about the problem here.
Paste a link to your repository here
https://github.com/EricCSheppard/Project3-client/tree/eric