improvement: updated toasts. no invisible toast anymore.

This commit is contained in:
2026-07-12 21:30:28 +03:30
parent 540a339723
commit 53b43f2cdb
14 changed files with 236 additions and 140 deletions

View File

@@ -40,6 +40,12 @@ Reference: `app/.../treatment/page.tsx` + `components/ui/treatment/TreatmentWork
- API clients: `lib/api/`.
- Catch blocks: `getUserFacingError(err, tErrors, fallback)` from `components/shared/formatApiError.ts`.
## Toasts
- Use `useToast()` for transient page feedback — rendered globally by `ToastProvider` in dashboard layout (fixed bottom, above dialogs).
- Do **not** add `<ToastStack />` inside pages or dialogs.
- Form/dialog validation: inline error text near the field or submit button, not a toast.
## When adding UI
1. Check `components/ui/shared/` for an existing primitive.