Skip to content

Commit

Permalink
date added
Browse files Browse the repository at this point in the history
  • Loading branch information
AchyuthMohan committed Dec 2, 2022
1 parent 8d01e65 commit 83a988b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/pages/PlaceDetailPage/BookingComponent.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ const BookingComponent = ({placeName,placeImage,stayId, placeid,setStayId,travel
const[travelName,setTravelName]=useState()
const[travelImage,setTravelImage]=useState()
const [open, setOpen] = React.useState(false);
const[date,setDate]=useState()

const handleClickOpen = () => {
setOpen(true);
Expand All @@ -31,7 +32,7 @@ const BookingComponent = ({placeName,placeImage,stayId, placeid,setStayId,travel
const finalSubmit=()=>{
axiosInstance.post(`${baseUrl}/bookings/`,
{
date_to_book: "2022-11-11",
date_to_book: date,
place_name: placeName,
place_image: placeImage,
stay_name: stayName,
Expand Down Expand Up @@ -113,15 +114,14 @@ useEffect(()=>{
<button onClick={nextFrame} className='next__button'>Next</button>
</div>

{/* <button onClick={finalSubmit}>Book Now</button> */}
</div>
)
}

else if(state===2){
return(
<div className='booked__travels_main'>

<input type="date" value={date} onChange={(e)=>{setDate(e.target.value)}} /><br />
<button onClick={prevFrame} className='prev__button'>Prev</button>

<button onClick={handleClickOpen} className='next__button'>Book Now</button>
Expand Down

0 comments on commit 83a988b

Please sign in to comment.