diff --git a/src/components/Editprofileform/Editprofileform.js b/src/components/Editprofileform/Editprofileform.js index 15d0768..c3a03c4 100644 --- a/src/components/Editprofileform/Editprofileform.js +++ b/src/components/Editprofileform/Editprofileform.js @@ -6,7 +6,7 @@ import {useState} from 'react' function Editprofileform() { - const[actualname,setActualname]=useState('') + const[actualname,setActualname]=useState('') const[phno,setPhno]=useState('') const[userimg,setUserimg]=useState() @@ -19,14 +19,12 @@ function Editprofileform() { uploaddata.append('userimg',userimg) axiosInstance.post(`${baseUrl}/user-detail/`,{ - - "actual_name":actualname, - "phno":phno, - "user_image":uploaddata.userimg, - "user_foreign":localStorage.getItem('userid') - + actual_name:actualname, + phno:phno, + user_image:uploaddata.userimg, + user_foreign:localStorage.getItem('userid') }).then((response)=>{ -console.log(response) + console.log(response) }) e.preventDefault(); diff --git a/src/pages/Dashboard/Dashboard.js b/src/pages/Dashboard/Dashboard.js index 58a4a05..00b0301 100644 --- a/src/pages/Dashboard/Dashboard.js +++ b/src/pages/Dashboard/Dashboard.js @@ -22,7 +22,7 @@ const Dashboard = () => { const[frame,setFrame]=useState('places') const [show, setShow] = useState(false); const handleClose = () => setShow(false); - + const[userDetailId,setUserDetailId]=useState(0) const parachuteEffect={ loop: true, autoplay: true, @@ -48,6 +48,7 @@ const Dashboard = () => { response.data.forEach((item)=>{ if(item.user_foreign===currUserid) { console.log("hi") + setUserDetailId(item.id) setActualname(item.actual_name) setPhno(item.phno) } @@ -80,7 +81,7 @@ const Dashboard = () => { - +