Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ports - Mina #8

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
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
5 changes: 3 additions & 2 deletions src/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,19 @@ import './App.css';
import timelineData from './data/timeline.json';

import Timeline from './components/Timeline';
import TimelineEvent from './components/TimelineEvent';

class App extends Component {
render() {
console.log(timelineData);

// Customize the code below
return (
<div className="App">
<header className="App-header">
<h1 className="App-title">Application title</h1>
<h1 className="App-title">Ada Lovelace's Feed</h1>
</header>
<main className="App-main">
<TimelineEvent person="Mina" status="angry" timestamp="2018-05-18T22:12:03Z"/>
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

😂

</main>
</div>
);
Expand Down
14 changes: 11 additions & 3 deletions src/components/Timeline.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,16 @@ import './Timeline.css';
import TimelineEvent from './TimelineEvent';

const Timeline = () => {
// Fill in your code here
return;
}
// const timelinePosts = events.map( (post, i) => {
// return (
// <li key={i}>
// <Timeline
// person={ post.person }
// status={ post.status }
// timeStamp={ post.Timestamp } />
// </li>
// );
// });
};

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

const TimelineEvent = () => {
// Fill in your code here
return;
}
const personTimestamp = (props) => {
return (
<Timestamp time={ props } />
);
};

const TimelineEvent = (props) => {
return (
<section>
<h3>
Person: { props.person }
</h3>
<p>
Status: { props.status}
</p>
<p>
Timestamp: { personTimestamp(props.timeStamp) }
</p>
</section>
);
};

export default TimelineEvent;