diff --git a/src/pages/Dashboard/Dashboard.js b/src/pages/Dashboard/Dashboard.js index 00b0301..ad08e97 100644 --- a/src/pages/Dashboard/Dashboard.js +++ b/src/pages/Dashboard/Dashboard.js @@ -47,7 +47,7 @@ const Dashboard = () => { console.log(response) response.data.forEach((item)=>{ if(item.user_foreign===currUserid) - { console.log("hi") + { setUserDetailId(item.id) setActualname(item.actual_name) setPhno(item.phno) diff --git a/src/pages/Login/Login.js b/src/pages/Login/Login.js index 9a65562..a8ccdfa 100644 --- a/src/pages/Login/Login.js +++ b/src/pages/Login/Login.js @@ -31,6 +31,8 @@ const Login = () => { if(res.status===200) navigate('/') + },(error)=>{ + }) } diff --git a/src/pages/PlaceDetailPage/PlaceDetailPage.js b/src/pages/PlaceDetailPage/PlaceDetailPage.js index 503d0da..845cd7c 100644 --- a/src/pages/PlaceDetailPage/PlaceDetailPage.js +++ b/src/pages/PlaceDetailPage/PlaceDetailPage.js @@ -16,7 +16,7 @@ const PlaceDetailPage = () => { const[travelId,setTravelId]=useState(0) const[things,setThings]=useState([]) const[flights,setFlights]=useState([]) - const[hotel,setHotel]=useState([]) + const[hotels,setHotels]=useState([]) useEffect(()=>{ axios.get(`${baseUrl}/flights/`).then((response)=>{ setFlights(response.data) @@ -46,7 +46,7 @@ const PlaceDetailPage = () => { useEffect(()=>{ axios.get(`${baseUrl}/hotels/`).then((response)=>{ - setHotel(response.data) + setHotels(response.data) }) },[]) const nextFrame=()=>{ @@ -120,12 +120,13 @@ const PlaceDetailPage = () => {
Hotel Name: {hotels.hotel_name}
-Train Time: {hotels.near_point}
-Cost: {hotels.famous_foods}
+ +Hotel Name: {hotel.hotel_name}
+Near Point: {hotel.near_point}
+Famous Foods: {hotel.famous_foods}