-
Notifications
You must be signed in to change notification settings - Fork 43
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
Conversation
// 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') { |
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.
You can also use the aborted
property, which is the more common way of checking if a signal was aborted.
if (abortController.current?.signal.reason === 'user-cancelled') { | |
if (abortController.current?.signal.aborted) { |
} | ||
useEffect(() => { | ||
if (!showWorkspaceConfirmation) { | ||
abortController.current?.abort('user-cancelled') |
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.
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).
No description provided.