Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,11 @@ function App() {
return (
<div className="App">
<header className="App-header">
<h1 className="App-title">Application title</h1>
<h1 className="App-title">{timelineData.person}'s Social Media Feed</h1>
</header>
<main className="App-main">
</main>
< Timeline events = {timelineData.events} />
</div>
);
}
Expand Down
19 changes: 15 additions & 4 deletions src/components/Timeline.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,20 @@ import React from 'react';
import './Timeline.css';
import TimelineEvent from './TimelineEvent';

const Timeline = () => {

return;
}
const Timeline = (props) => {
const components = props.events.map((event, i) => {
return (
<div key={i}>
<TimelineEvent person={event.person} status={event.status} time={event.timeStamp}/>
</div>
);
});

return(
<div className="timeline">
{components}
</div>
);
};

export default Timeline;
15 changes: 11 additions & 4 deletions src/components/TimelineEvent.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,16 @@ import React from 'react';
import './TimelineEvent.css';
import Timestamp from './Timestamp';

const TimelineEvent = () => {

return;
}

const TimelineEvent = (props) => {
return (
<div className="timeline-event">
<div className="event-person">{props.person}</div>
<div className="event-status">{props.status}</div>
<div className="event-time"><Timestamp time={props.timestamp}/></div>
</div>
// return;
);
};

export default TimelineEvent;