Skip to content

Commit

Permalink
addByNew18
Browse files Browse the repository at this point in the history
  • Loading branch information
Rung6699 committed Dec 11, 2020
1 parent ab45d77 commit c0038b1
Showing 1 changed file with 29 additions and 7 deletions.
36 changes: 29 additions & 7 deletions frontend/src/components/pages/Profile.js
Original file line number Diff line number Diff line change
Expand Up @@ -163,12 +163,12 @@ export default function Profile(props) {
setBreeds(res.data.breeds);
setLocation(res.data.location);
setAbout(res.data.about);
setProfileData(res.data.profilePicture);
setCertificateData(res.data.certificate);
setPicture1Data(res.data.picture1);
setPicture2Data(res.data.picture2);
setPicture3Data(res.data.picture3);
setPicture4Data(res.data.picture4);
setProfileData((res.data.profilePicture)? res.data.profilePicture:require("./z_add9.jpg"));
setCertificateData((res.data.certificate)? res.data.certificate:require("./z_add6.png"));
setPicture1Data((res.data.picture1)? res.data.picture1:require("./z_add7.png"));
setPicture2Data((res.data.picture2)? res.data.picture2:require("./z_add7.png"));
setPicture3Data((res.data.picture3)? res.data.picture3:require("./z_add7.png"));
setPicture4Data((res.data.picture4)? res.data.picture4:require("./z_add7.png"));
}).catch((err) => {
console.log(err)
alert("refresh error")
Expand Down Expand Up @@ -398,6 +398,14 @@ export default function Profile(props) {

</Grid>
<Grid container item xs={2} direction="column" align="left" style={{ "marginLeft": "5px" }}>

<input
id="fi4"
type="file"
accept="image/*"
onChange={onChangePicture2}
hidden
/>

<label htmlFor="fi4">
<div
Expand Down Expand Up @@ -429,7 +437,13 @@ export default function Profile(props) {

</Grid>
<Grid container item xs={2} direction="column" align="left" style={{ "marginLeft": "5px" }}>

<input
id="fi5"
type="file"
accept="image/*"
onChange={onChangePicture3}
hidden
/>
<label htmlFor="fi5">
<div
style={{
Expand Down Expand Up @@ -458,6 +472,14 @@ export default function Profile(props) {

</Grid>
<Grid container item xs={3} direction="column" align="left" style={{ "marginLeft": "5px" }}>

<input
id="fi6"
type="file"
accept="image/*"
onChange={onChangePicture4}
hidden
/>

<label htmlFor="fi6">
<div
Expand Down

0 comments on commit c0038b1

Please sign in to comment.