-
Notifications
You must be signed in to change notification settings - Fork 0
Feat/view bidders #1
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
base: master
Are you sure you want to change the base?
Conversation
| import React, { Component } from 'react'; | ||
| import request from 'request'; | ||
| import { BrowserRouter as Router, Route, Link } from "react-router-dom"; | ||
| import classnames from 'classnames'; |
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.
classnames is imported but it is never used
| constructor(props) { | ||
| super(props); | ||
|
|
||
| var res = []; |
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.
Fetching data in the constructor may result to rendering witout having all the data . This should be done in the ComponentDidMount method
| super(props); | ||
|
|
||
| var res = []; | ||
| request('http://bidders.mytestcompany.com', function (error, response, body) { |
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.
Request package has been deprecated. Better use axios or fetch.
| var live = []; | ||
| var created = []; | ||
|
|
||
| for (var i = 1; i < res.length; i++) { |
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.
This loop does not include the last item of the array.
| <hr className="bottom-spacing-2x top-spacing-2x" /> | ||
| </div> | ||
| </div> | ||
| <div className="column small-12 medium-6 bottom-spacing-1x"> |
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.
The two columns should be wrapped in a row so they are both in the same line.
| <ul> | ||
| <li> | ||
| <a class="active" href="/bidders"> | ||
| <Link to="/bidders" activeClass="active"> |
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.
activeClass is unnecessary
| <li> | ||
| <a class="active" href="/bidders"> | ||
| <Link to="/bidders" activeClass="active"> | ||
| <i class="icon location_world"></i> |
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.
class should be changed to className
| <div className="column small-12 medium-6 bottom-spacing-1x"> | ||
| <div data-testid="created-bidders-list" className="card" style={{height: '100%'}}> | ||
| <p className="card__title">1. Created </p> | ||
| {this.state.created.map(function (bidder) { |
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.
Both map functions should have a unique key id
baspavlou
left a comment
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.
Please review the mentioned changes.
No description provided.