eclipse-tractusx / portal-shared-components

Portal Shared UI Components
https://eclipse-tractusx.github.io/portal-shared-components
Apache License 2.0
1 stars 11 forks source link

fix: added error handler prop to components #277

Open charmi-v opened 3 weeks ago

charmi-v commented 3 weeks ago

Description

Shared component containing error handlers with console.log

Why

Issue

148

Checklist

Please delete options that are not relevant.

charmi-v commented 3 weeks ago

@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.

sonarcloud[bot] commented 2 weeks ago

Quality Gate Passed Quality Gate passed

Issues
1 New issue
0 Accepted issues

Measures
0 Security Hotspots
0.0% Coverage on New Code
0.0% Duplication on New Code

See analysis details on SonarCloud