-
Notifications
You must be signed in to change notification settings - Fork 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
Created new FeedList Component #2
Conversation
Pull Request Test Coverage Report for Build 16
💛 - Coveralls |
src/components/Home.jsx
Outdated
@@ -22,18 +25,31 @@ class Home extends Component { | |||
if (this.props.token && !this.props.user) { | |||
this.props.getInfo(); | |||
} | |||
|
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.
try not to push commented code
src/components/FeedsList.jsx
Outdated
import PropTypes from 'prop-types'; | ||
|
||
export default function FeedList(props) { | ||
function timeSince(date) { |
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.
Since this is a common function, create file name Utils.js and add these functions there so that we can reuse it.
src/components/FeedsList.jsx
Outdated
import PropTypes from 'prop-types'; | ||
|
||
export default function FeedList(props) { | ||
function timeSince(date) { |
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.
check if some library provides this function like moment.js
or lodash
src/service/httpFetch.js
Outdated
@@ -21,6 +21,17 @@ export function getUserDetails() { | |||
}); | |||
} | |||
|
|||
|
|||
export function getFeeds(username) { |
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.
Remove code duplication here. Make axios configuration common.
… \n Removed unnecessary comments from files.
Component to show logged In user's public feed.