import React from 'react'; import Carousel from 'nuka-carousel'; class BookingIndexItem extends React.Component { constructor(props){ super(props); this.deleteBooking = this.deleteBooking.bind(this) } deleteBooking(e) { e.preventDefault(); let bookingId = this.props.booking.id; this.props.deleteBooking(bookingId) .then(() => this.props.fetchUser(this.props.userId)); } render(){ const { booking, spot } = this.props; return (
${spot.price}/night