-
Notifications
You must be signed in to change notification settings - Fork 36
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
add number of comments #65
Conversation
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.
@@ -21,7 +21,7 @@ const SearchResultsContainer = ({ currentPage, onPageChange, results }) => { | |||
const formattedResults = | |||
results.items[0] && | |||
results.items.map(item => { | |||
const htmlUrl = item.html_url.split('/'); | |||
const { htmlUrl, comments } = [item.html_url.split('/'), item.comments]; |
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.
Would it be possible to do this on a separate line than the htmlUrl -
const { comments } = item;
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.
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.
Oh gotcha. Please skip the lint:fix command for now
@@ -38,7 +39,8 @@ export const SearchResult = ({ | |||
<p className="body-text">{bodyText}</p> | |||
|
|||
<div className="metadata"> | |||
<div>{`${userName}/${repoName}`}</div> | |||
<div>{`${userName}/${repoName}`} </div> | |||
<div className="comments">{`Total comments ${comments}`}</div> |
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.
Could we do -
Comments: ${comments}
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.
Sure, thanks for the advice.
Also sorry, there are some merge conflicts which were introduced by this PR (if it helps to look at it |
I guess it is because I ran the |
Awesome, thanks @tianlangwu ! |
This RP is for issue-57. The number of comments shows on the bottom left of each issue.
When I am run the command
npm run lint:fix
to check my formatting, it automatically formats something in the other files.Let me know if I did anything incorrectly, thanks for the consideration.