diff --git a/src/App.js b/src/App.js index 5f4cdf8..ebf25ec 100644 --- a/src/App.js +++ b/src/App.js @@ -1,24 +1,24 @@ import React, { Component } from 'react'; import './App.css'; import timelineData from './data/timeline.json'; +import TimelineEvent from './components/TimelineEvent' import Timeline from './components/Timeline'; class App extends Component { render() { - console.log(timelineData); - - // Customize the code below + return (
-

Application title

+

Ada Lovelace's social media feed

+
); } } -export default App; +export default App; \ No newline at end of file diff --git a/src/components/Timeline.css b/src/components/Timeline.css index e31f946..b612030 100644 --- a/src/components/Timeline.css +++ b/src/components/Timeline.css @@ -3,3 +3,7 @@ margin: auto; text-align: left; } + +ul { + list-style: none; +} diff --git a/src/components/Timeline.js b/src/components/Timeline.js index 624d4ec..b40e3f9 100644 --- a/src/components/Timeline.js +++ b/src/components/Timeline.js @@ -2,9 +2,28 @@ import React from 'react'; import './Timeline.css'; import TimelineEvent from './TimelineEvent'; -const Timeline = () => { - // Fill in your code here - return; +const Timeline = (props) => { + + const events = props.events + + const TimelineEventComponents = events.map( (event, i) => { + return ( +
  • + +
  • + ); + }); + + return ( +
    + +
    + ); } -export default Timeline; +export default Timeline; \ No newline at end of file diff --git a/src/components/TimelineEvent.css b/src/components/TimelineEvent.css index ea6407a..d9d1fda 100644 --- a/src/components/TimelineEvent.css +++ b/src/components/TimelineEvent.css @@ -18,6 +18,7 @@ .event-status { grid-area: 2 / 1 / span 1 / -1; + word-break: break-all; } .event-time { diff --git a/src/components/TimelineEvent.js b/src/components/TimelineEvent.js index 9079165..0072aed 100644 --- a/src/components/TimelineEvent.js +++ b/src/components/TimelineEvent.js @@ -2,9 +2,16 @@ import React from 'react'; import './TimelineEvent.css'; import Timestamp from './Timestamp'; -const TimelineEvent = () => { - // Fill in your code here - return; +const TimelineEvent = (props) => { + return ( +
    + { props.person } + +

    + { props.status } +

    +
    + ); } export default TimelineEvent;