Skip to content

Commit

Permalink
Get user reservation photos to show up on the user show page
Browse files Browse the repository at this point in the history
  • Loading branch information
bjjeong committed Sep 20, 2018
1 parent 947591e commit bf1023a
Show file tree
Hide file tree
Showing 4 changed files with 45 additions and 11 deletions.
27 changes: 27 additions & 0 deletions app/assets/stylesheets/users.scss
Original file line number Diff line number Diff line change
@@ -1,3 +1,30 @@
// Place all the styles related to the Users controller here.
// They will automatically be included in application.css.
// You can use Sass (SCSS) here: http://sass-lang.com/

.reservation-index {
width: 100%;
display: flex;
flex-wrap: wrap;
justify-content: center;

.reservation-title {
width: 96%;
font-size: 2.2em;
font-family: Circular, "Helvetica Neue", Helvetica, Arial, sans-serif;
color: #484848;
}

.list {
width: 80%;
display: flex;
flex-wrap: wrap;
justify-content: center;
}

.reservation {
width: 30%;
height: 30vh;
}

}
14 changes: 7 additions & 7 deletions frontend/components/root.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@ import { HashRouter } from 'react-router-dom';

const Root = ({ store }) => {

return (
<Provider store={store}>
<HashRouter>
<App />
</HashRouter>
</Provider>
);
return (
<Provider store={store}>
<HashRouter>
<App />
</HashRouter>
</Provider>
);
};

export default Root;
6 changes: 4 additions & 2 deletions frontend/components/user/user_list_item.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,10 @@ const UserListItem = (props) => {
let {home, reservation } = props;

return (
<div>
<div> {home.id} </div>
<div className="home-index-item">
<div className="home-index-photo-container">
<img className="home-index-photo" src={home.photoUrl} />
</div>
</div>
);
};
Expand Down
9 changes: 7 additions & 2 deletions frontend/components/user/user_show.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,13 @@ class User extends React.Component {
});

return(
<div>
<ul>
<div className="reservation-index">
<ul className="list">
<li className="reservation-title">
<div>
<h1>My Reservations</h1>
</div>
</li>
{userHomes.map((payload, index) => (
<UserListItem
key={index}
Expand Down

0 comments on commit bf1023a

Please sign in to comment.