in static-site/app/js/app.js [60:81]
render() {
let footerHeight = this.state.windowWidth > 640 ? 60 : 32,
footerTop = this.state.windowHeight - footerHeight,
headerHeight = this.state.windowWidth > 640 ? 60 : 32,
cardWidth = this.state.windowWidth / this.state.cols,
cardHeight = (this.state.windowHeight - headerHeight - footerHeight) / this.state.rows,
cards = [];
this.state.data.forEach((category, categoryIndex) => {
let left = categoryIndex * cardWidth;
category.questions.forEach((question, questionIndex) => {
cards.push(<Card left={left} top={questionIndex * cardHeight + headerHeight} height={cardHeight} width={cardWidth} question={question} key={categoryIndex + '-' + questionIndex}/>);
})
});
return (
<div>
<Headers data={this.state.data} headerWidth={cardWidth}/>
{cards}
<Footer top={footerTop} width={this.state.windowWidth} height={footerHeight} />
</div>
);
}