Skip to content

Hometask 7#86

Open
0ro wants to merge 10 commits intoromabelka:masterfrom
0ro:hometask_7
Open

Hometask 7#86
0ro wants to merge 10 commits intoromabelka:masterfrom
0ro:hometask_7

Conversation

@0ro
Copy link

@0ro 0ro commented Feb 10, 2018

No description provided.

const currentPage = nextProps.currentPage
const offset = (currentPage-1) * limit
if (!nextProps.contentLoading && !nextProps.contentLoaded) {
this.props.loadAllComments(currentPage || 1, {limit, offset})
Copy link
Owner

Choose a reason for hiding this comment

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

я бы передавал page, а уже тут превращал это в offset и limit

case LOAD_ARTICLE_COMMENTS + SUCCESS:
return state.mergeIn(['entities'], arrToMap(response, CommentRecord))

case LOAD_ALL_COMMENTS + SUCCESS:
Copy link
Owner

Choose a reason for hiding this comment

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

Почему ALL_COMMENTS?

Copy link
Author

Choose a reason for hiding this comment

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

В самом начале так назвал, но действительно лучше название связать с page

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.

2 participants