Conversation
|
|
||
| render() { | ||
| console.log(timelineData); | ||
| const eventObjects = timelineData.events.map((event, i) => { |
There was a problem hiding this comment.
Looks like you are not using 'i' in this block.
|
|
||
| class App extends Component { | ||
|
|
||
| render() { |
There was a problem hiding this comment.
Nice use of a variable to make the code in your return clean.
|
|
||
| render() { | ||
| console.log(timelineData); | ||
| const eventObjects = timelineData.events.map((event, i) => { |
There was a problem hiding this comment.
If you take a look at the JSON, you will see that there is an Events key which is the array of statuses. Both seem to work. :)
| import './Timeline.css'; | ||
| import TimelineEvent from './TimelineEvent'; | ||
| // testing | ||
| const Timeline = (props) => { |
There was a problem hiding this comment.
Very clean. Looks like you are not using 'i' in this block. You may want to consider using it as a key.
| const Timeline = () => { | ||
| // Fill in your code here | ||
| return; | ||
| return ( |
| <section class="timeline-event"> | ||
| <h4 class="event-person">{props.person}</h4> | ||
| <p class="event-status">{props.status}</p> | ||
| <p class="event-time"><Timestamp time={props.timestamp} /></p> |
There was a problem hiding this comment.
It appears that this is not actually working. The date stamps would be something like a year ago (I ran into this problem too). Consider taking a look at the JSON file. The key for timeStamp has a capital 's'. I would play around with this to see if you can see the timestamp based off of the dates in the JSON file. :)
| const TimelineEvent = () => { | ||
| // Fill in your code here | ||
| return; | ||
| const TimelineEvent = (props) => { |
There was a problem hiding this comment.
Beautiful. Good use of classes. Would this be a place to use className instead of class?
React Timeline
Congratulations! You're submitting your assignment!
Comprehension Questions