Skip to content

Add and configure infinity scroll - #32

Open
OlegGre4ka wants to merge 2 commits into
mainfrom
infinity-scroll
Open

Add and configure infinity scroll#32
OlegGre4ka wants to merge 2 commits into
mainfrom
infinity-scroll

Conversation

@OlegGre4ka

@OlegGre4ka OlegGre4ka commented Dec 29, 2023

Copy link
Copy Markdown
Collaborator
  • - added and configured infinity scroll for qraphql request with bloodCenters data

@OlegGre4ka
OlegGre4ka requested a review from mrPronin December 29, 2023 20:06
@OlegGre4ka OlegGre4ka self-assigned this Dec 29, 2023
@OlegGre4ka
OlegGre4ka requested a review from valoricDe December 29, 2023 20:15
first: 4,
},
updateQuery: (prev, { fetchMoreResult }) => {
initData(fetchMoreResult);

@valoricDe valoricDe Jan 13, 2024

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Suggested change
initData(fetchMoreResult);
setData(fetchMoreResult);

could be renamed to better reflect that is it not only on initial load

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

renamed, thaks)!

}
};

const initData = (data: IBloodDonationCenterConnection) => {

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I think useCallback could make sense here

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

added

valoricDe
valoricDe previously approved these changes Jan 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants