improvement: updated toasts. no invisible toast anymore.
This commit is contained in:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user