Add API toast service for ARO and MCC#599
Merged
batteryspecial merged 7 commits intomainfrom Nov 12, 2025
Merged
Conversation
Pull reviewers statsStats of the last 120 days for UWOrbital:
|
kepler452b123
previously requested changes
Nov 4, 2025
Contributor
kepler452b123
left a comment
There was a problem hiding this comment.
One qn, rest looks fine
Removed duplicate toast service in ARO
The requested changes are complete.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Purpose
Closes #570.
New Changes
react-toastify, so be sure to install that.How to Use the Service
Usage
Import the Service
Call the Service
The service should be used within logic that handles asynchronous operations, such as in a try...catch...finally block after an API call.
On Success, call
toastService.success()with a confirmation message.On Error, call
toastService.error()with an informative error message.Example Implementation for a Form
Place a single at the application root and trigger toasts from the API service layer.
Example in App.tsx
Try running the following code added to App.tsx. The dots
...represents the rest of the code.Clicking on the buttons should display the error messages respectively.
Testing
Explain tests that you ran to verify code functionality.
2025-10-14.mp4
Outstanding Changes
Because this is meant to be a standardized service, I tried making the service with generality in mind. You can use this for any API call, from backend to frontend responses (although it was designed for frontend).