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

✨ Paginate events when adding to workspace #284

Merged
merged 4 commits into from
Feb 4, 2025

Conversation

foysalit
Copy link
Contributor

No description provided.

// if the modal is closed, that means the user decided not to add any more user to workspace
} while (cursor && showWorkspaceConfirmation)
} catch (e) {
if (abortController.current?.signal.reason === 'user-cancelled') {
Copy link
Contributor

Choose a reason for hiding this comment

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

You can also use the aborted property, which is the more common way of checking if a signal was aborted.

Suggested change
if (abortController.current?.signal.reason === 'user-cancelled') {
if (abortController.current?.signal.aborted) {

}
useEffect(() => {
if (!showWorkspaceConfirmation) {
abortController.current?.abort('user-cancelled')
Copy link
Contributor

Choose a reason for hiding this comment

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

Only Error instances should ever be used as abort reason. This is otherwise similar to throw "some string". Note that you can do ac.abort() (no argument).

@arcalinea arcalinea temporarily deployed to paginate-events-to-workspace - ozone-staging PR #284 February 4, 2025 11:59 — with Render Destroyed
@foysalit foysalit merged commit 4f66d9c into main Feb 4, 2025
3 checks passed
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.

3 participants