import React, { useState } from 'react'; import * as Icon from 'react-feather'; import NumberFormat from 'react-number-format'; const Checkout = function ({ transactionToken, backend, review, ...props }) { const ReviewContens = review.map((data) => { const Checkin = data.checkIn; const [Checkinyear, Checkinmonth, Checkinday] = Checkin.split('-') const Checkout = data.checkOut; const [Checkoutnyear, Checkoutnmonth, Checkoutnday] = Checkout.split('-') const date = (new Date(data.checkIn)).getTime(); const today = (new Date(data.checkOut)).getTime(); const msDay = 24 * 60 * 60 * 1000; // milliseconds per day const days = Math.floor((today - date) / msDay); return (
Fasilitas :
{`${Checkinday}/${Checkinmonth}/${Checkinyear}`}
Setelah 14:00
{`${Checkoutnday}/${Checkoutnmonth}/${Checkoutnyear}`}
Sebelum 14:00
{days} Hari
1 Orang
Jenis Kamar | Total |
---|---|
Catania {data.namaKamar} |
|
Pajak 10% |
|
Total |
|