-
Notifications
You must be signed in to change notification settings - Fork 2
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
feat/loading shimmer #50
Conversation
NikitaCG
commented
May 17, 2023
•
edited
Loading
edited
- add load shimmer
- refactor feed component logic
- fix mocks data for story
Preview is ready. |
src/blocks/Feed/Feed.tsx
Outdated
handleChangeQueryParams({page: value}); | ||
}; | ||
if (hasFirstPageQuery) { | ||
// eslint-disable-next-line no-not-accumulator-reassign/no-not-accumulator-reassign |
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.
Can you write it without eslint disable?
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.
refactored
/** | ||
* @deprecated Metrika will be deleted after launch of analyticsEvents | ||
*/ | ||
metrika.reachGoal(MetrikaCounter.CrossSite, BlogMetrikaGoalIds.showMore); | ||
handleAnalytics(); | ||
|
||
const nextPage = currentPage + 1; |
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.
const nextPage = currentPage + 1; | |
const nextPage = currentPage++; |
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.
currentPage
is a variable from reducer, we cannot change this with ++.
we set currentPage
in https://github.com/gravity-ui/blog-constructor/pull/50/files/7682f1b4830806edc1899ab1bbea16f03443254e#diff-7259b0c4587b3a60e4fb59ad5d1d5176d139f9f5c480c7025aec7d6c31999bfdR188 line