-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Offers mockup #16
Offers mockup #16
Conversation
padding-right: 137px; | ||
margin-right: 100px; | ||
height: 420px; | ||
background-size: cover; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
?? what's this for?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's convenient way to keep images with different dimensions in the same frame (I assume that pictures from users have different sizes)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yep, but do we use it as backgrounds? Is that better then <img>
?
src/ts/Container/index.tsx
Outdated
@@ -5,10 +5,11 @@ import Footer from '../Footer'; | |||
import Header from '../Header'; | |||
|
|||
export default function Container(props) { | |||
const header = props.close ? null : <Header />; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
const header = props.close && <Header />;
src/ts/Detail/Comments.tsx
Outdated
import * as _ from 'lodash'; | ||
|
||
export default function Comments(props) { | ||
const stars = () => _.times(5, i => <FontIcon key={i} className="fa fa-star"/>); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why not a value?
const stars = _.times(5, i => <FontIcon key={i} className="fa fa-star"/>);
<div className="text"> | ||
Aba. By that I mean a comment which is actually quite in-depth, but I can't really | ||
<br/> | ||
articulate it well just yet, because I am only two years old. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
😂
(laughing at my own jokes)
src/ts/Detail/Comments.tsx
Outdated
</div> | ||
</div> | ||
<div className="view-all"> | ||
View all references |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should be a link
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
<div className="view-all">
<a href>View all references</a>
</div>
@@ -0,0 +1,155 @@ | |||
const ktm = { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
<3
src/ts/Offers/Offer.tsx
Outdated
approx, | ||
} = props.data; | ||
const img = props.data.images.main; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
how can we be sure that those props exist?
perhaps _.get(props, 'data.images.main')
would be safer?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lodash ftw!
@@ -19,7 +19,7 @@ export default function OffersList(props) { | |||
</button> | |||
); | |||
|
|||
const mappedItems = data.map(item => <Offer data={item} key={item.key} />); | |||
const mappedItems = data.map(item => <Offer data={item} key={item.url} />); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sweet
@@ -8,7 +8,7 @@ describe('<Router />', () => { | |||
it('check for all paths', () => { | |||
const paths = [ | |||
'/', | |||
'/detail', | |||
'/offer/:offer', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good!
@@ -18,7 +18,7 @@ export default function AppRouter(props) { | |||
return ( | |||
<Router history={browserHistory}> | |||
<Route path="/" component={Offers} /> | |||
<Route path="/detail" component={Detail} /> | |||
<Route path="/offer/:offer" component={Detail} /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🍕
Created offers list & offers details with hardcoded data.