Skip to content
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

Created new FeedList Component #2

Merged
merged 4 commits into from
Mar 29, 2018
Merged

Created new FeedList Component #2

merged 4 commits into from
Mar 29, 2018

Conversation

kaushiknishchay
Copy link
Owner

Component to show logged In user's public feed.

@coveralls
Copy link

coveralls commented Mar 28, 2018

Pull Request Test Coverage Report for Build 16

  • 4 of 13 (30.77%) changed or added relevant lines in 2 files are covered.
  • 1 unchanged line in 1 file lost coverage.
  • Overall coverage decreased (-0.5%) to 47.101%

Changes Missing Coverage Covered Lines Changed/Added Lines %
src/components/FeedsList.jsx 3 7 42.86%
src/components/Home.jsx 1 6 16.67%
Files with Coverage Reduction New Missed Lines %
src/components/Home.jsx 1 36.36%
Totals Coverage Status
Change from base Build 11: -0.5%
Covered Lines: 48
Relevant Lines: 88

💛 - Coveralls

@@ -22,18 +25,31 @@ class Home extends Component {
if (this.props.token && !this.props.user) {
this.props.getInfo();
}

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

try not to push commented code

import PropTypes from 'prop-types';

export default function FeedList(props) {
function timeSince(date) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since this is a common function, create file name Utils.js and add these functions there so that we can reuse it.

import PropTypes from 'prop-types';

export default function FeedList(props) {
function timeSince(date) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

check if some library provides this function like moment.js or lodash

@@ -21,6 +21,17 @@ export function getUserDetails() {
});
}


export function getFeeds(username) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove code duplication here. Make axios configuration common.

@kaushiknishchay kaushiknishchay merged commit c62ba25 into dev Mar 29, 2018
@kaushiknishchay kaushiknishchay deleted the feed-list branch March 29, 2018 08:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants