-
Notifications
You must be signed in to change notification settings - Fork 15
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
fix: added error handler prop to components #277
base: main
Are you sure you want to change the base?
fix: added error handler prop to components #277
Conversation
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.
@charmi-v we already have a snackbar management logic in the portal-frontend where the snackbars are managed in Redux:
https://github.com/eclipse-tractusx/portal-frontend/blob/main/src/features/control/notify.ts
https://github.com/eclipse-tractusx/portal-frontend/blob/main/src/services/NotifyService.ts
https://github.com/eclipse-tractusx/portal-frontend/blob/main/src/components/pages/Test/index.notify.tsx
I think a better solution is to pass a error or success handler function to the according shared components as props - this could be NotifyService.(error|success)
@oyo Thank you for highlighting that! I appreciate the context regarding the existing snackbar management in the portal-frontend.
|
Quality Gate passedIssues Measures |
Description
Shared component containing error handlers with console.log
Why
onError
prop to the shared component to handle errors from the parent component when the issue originates within the component.Issue
#148
Checklist
Please delete options that are not relevant.