map and cards clickable

This commit is contained in:
Sol
2020-07-14 19:38:28 +01:00
committed by Lachlan Kermode
parent c8768f643b
commit 31bdbd0313
6 changed files with 70 additions and 9 deletions

View File

@@ -163,8 +163,8 @@ class Card extends React.Component {
/>
) : null
}
render () {
render () {
const { isSelected, idx } = this.props
return (
@@ -172,6 +172,7 @@ class Card extends React.Component {
className={`event-card ${isSelected ? 'selected' : ''}`}
id={`event-card-${idx}`}
ref={this.props.innerRef}
onClick={(e) => {this.props.onClick(idx);} }
>
{this.renderMain()}
{this.state.isOpen ? this.renderExtra() : null}