import React from 'react';
class TimelineCategories extends React.Component {
getY(idx) {
const h = 76;
console.log((idx + 1) * h / this.props.categories.length)
return (idx + 1) * h / this.props.categories.length;
}
renderCategory(cat, idx) {
return (
{cat.category}
);
}
render () {
console.log(this.props.categories)
return (
{this.props.categories.map((cat, idx) => { return this.renderCategory(cat, idx); })}
);
}
}
export default TimelineCategories;