Skip to content

Instantly share code, notes, and snippets.

@paulopacitti
Created November 28, 2018 01:55
Show Gist options
  • Select an option

  • Save paulopacitti/df89ead9547b0141a30d726b07266445 to your computer and use it in GitHub Desktop.

Select an option

Save paulopacitti/df89ead9547b0141a30d726b07266445 to your computer and use it in GitHub Desktop.
let items = this.state.data.map((item, key) => {
return(
<ListGroupItem key={key} className={css(styles.fontCenter)}>
<font className={css(styles.fontOswald)}> {moment(item.date, "YYYY-MM-DD").format("DD/MM/YYYY")} | {item.time} | "{item.food}" | {item.kcal} </font> &nbsp; &nbsp; <a onClick={() => this.prepareUpdateRow(item)} className={css(styles.buttonListItem)}> update </a> &nbsp; <a onClick={() => this.prepareDeleteRow(item)} className={css(styles.buttonListItem)}>delete</a>
</ListGroupItem>);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment