diff --git a/README.md b/README.md index c633d225a..6b170e6a0 100644 --- a/README.md +++ b/README.md @@ -1 +1 @@ -Final Project \ No newline at end of file +Final Project from Ironhack's bootcamp: a social network built with ReactJS, NodeJS, MongoDB, JavaScript, HTML, CSS, Bootstrap, Cloudinary API. diff --git a/client/src/App.css b/client/src/App.css index 55c7ad69e..a254dab2c 100755 --- a/client/src/App.css +++ b/client/src/App.css @@ -167,8 +167,9 @@ h2 { @media only screen and (max-width: 800px) { .profile-intro { display: flex; - flex-direction: column-reverse; - } + flex-direction: column-reverse; + align-items: center; + } } .about-card { @@ -176,9 +177,11 @@ h2 { } .profile-picture-card { - padding-bottom: 2em; + padding-bottom: 2em; } + + .post-card { margin-bottom: 7vh; } diff --git a/client/src/App.js b/client/src/App.js index 2838a5580..b806b3a91 100755 --- a/client/src/App.js +++ b/client/src/App.js @@ -41,7 +41,7 @@ class App extends React.Component { const user = response.data; this.setState({ user: user, loadingUser: false }); }).catch((error) => { - this.setState({ user: undefined, loadingUser: false }); + this.setState({ user: undefined , loadingUser: false }); }); } @@ -78,7 +78,7 @@ class App extends React.Component { {/* Route to show your own profile */} } + render={props => } /> - + diff --git a/client/src/components/UploadMedia.js b/client/src/components/UploadMedia.js index 13aad6928..55c8d673b 100644 --- a/client/src/components/UploadMedia.js +++ b/client/src/components/UploadMedia.js @@ -44,7 +44,7 @@ export default class UploadMedia .then((response) => { // update the user and re-render the Profile console.log("Image Changed", response) - this.props.setUser(response.data); + this.props.loadUser(); }) .catch(err => console.log(err)); } diff --git a/routes/user.js b/routes/user.js index 6308fa0e1..d4d109a47 100644 --- a/routes/user.js +++ b/routes/user.js @@ -17,6 +17,8 @@ router.get('/:id', (req, res) => { city: user.city, skills: user.skills, hobbies: user.hobbies, + profilePicture: user.profilePicture, + uploadedMedia: user.uploadedMedia })); });