Skip to content

Instantly share code, notes, and snippets.

@edemkumodzi
Last active November 6, 2016 19:33
Show Gist options
  • Save edemkumodzi/c754cb5aea052cea242de19aaf99e82a to your computer and use it in GitHub Desktop.
Save edemkumodzi/c754cb5aea052cea242de19aaf99e82a to your computer and use it in GitHub Desktop.
import React, {Component} from 'react';
import Task from './Task.js';
class TaskList extends Component {
render() {
var tasks = [
{
'time': '12',
'period': 'AM',
'activity_title': 'Finish Tutorial Series',
'activity_description': '#ReactForNewbies'
}, {
'time': '9',
'period': 'AM',
'activity_title': 'Meeting with Team Leads',
'activity_description': 'New Project Kickoff'
}, {
'time': '11',
'period': 'AM',
'activity_title': 'Call Mom',
'activity_description': 'Return her call before she kills me'
}, {
'time': '3',
'period': 'PM',
'activity_title': 'Fix Wifey\'s website',
'activity_description': 'FB Ads Integration not working'
}, {
'time': '6',
'period': 'PM',
'activity_title': 'Do DB Backups',
'activity_description': 'Related to upcoming server migration'
}
];
return (
<div>
{tasks.map(function(task, index) {
return <Task
key={index}
time={task.time}
period={task.period}
activity_title={task.activity_title}
activity_description={task.activity_description}/>
})}
</div>
);
}
}
export default TaskList;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment