Commit Graph

3 Commits

Author SHA1 Message Date
644d907b45 Reset state on dialog close in ErrorDialog component 2025-07-11 19:33:27 +02:00
c99e09056c Refactor error handling utilities
- Replace `showError` with a more versatile `showToast` utility.
- Add specific toast functions (`showErrorToast`, `showSuccessToast`, etc.) for better message handling.
- Remove `showError.ts` and migrate logic to `showToast.ts` for cleaner structure.
- Update `ErrorBoundary` and `useErrorHandler` to use the new `showToast` functions.
2025-07-11 19:15:08 +02:00
18014ce9f0 Introduce ErrorBoundary component for improved error handling
- Add `ErrorBoundary` component to handle rendering fallback UI during errors.
- Integrate `ErrorBoundary` into main layout and critical pages for global error handling.
- Create `useErrorHandler` hook to handle async errors consistently across components.
- Refactor `NewCustomerModal` and `CustomersPage` to leverage `useErrorHandler` for improved error management.
- Add a fallback dialog UI for user-friendly error reporting and resolution.
2025-07-11 19:06:07 +02:00