Skip to content

Commit

Permalink
stach
Browse files Browse the repository at this point in the history
  • Loading branch information
AchyuthMohan committed Dec 3, 2022
1 parent 813ee7d commit 747a9e9
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 10 deletions.
14 changes: 6 additions & 8 deletions src/components/Editprofileform/Editprofileform.js
Original file line number Diff line number Diff line change
Expand Up @@ -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()

Expand All @@ -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();
Expand Down
5 changes: 3 additions & 2 deletions src/pages/Dashboard/Dashboard.js
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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)
}
Expand Down Expand Up @@ -80,7 +81,7 @@ const Dashboard = () => {
</Modal.Title>
</Modal.Header>
<Modal.Body>
<Editprofileform actualname={actualname} phno={phno} userimg={userimg} setActualname={setActualname} setPhno={setPhno} setUserimg={setUserimg}/>
<Editprofileform userDetailId={userDetailId} actualname={actualname} phno={phno} userimg={userimg} setActualname={setActualname} setPhno={setPhno} setUserimg={setUserimg}/>
</Modal.Body>
<Modal.Footer>
<Button variant="secondary" onClick={handleClose}>
Expand Down

0 comments on commit 747a9e9

Please sign in to comment.