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.title}

    From ·  {booking.check_in}
    To ·  {booking.check_out}

    ${spot.price}/night

  • ) } }; export default BookingIndexItem;