mirror of
https://github.com/temetro/temetro.git
synced 2026-07-26 11:58:14 +00:00
2c5624e049
Wire COSS's (Base UI) Sonner-style stacked toast into the app:
- Install @coss/toast (components/ui/toast.tsx) and mount <ToastProvider> in
the root layout; add a small notify.{success,error,info,warning} helper
(lib/toast.ts) over toastManager so callers don't repeat the toast shape.
- Toast on the events requested: clinic created (onboarding), auth actions
(sign in / sign up / sign out / password reset request + reset), patient
saved (create/edit), and all failure branches as error toasts (kept inline
errors as a fallback). New auth toast strings added to the en translation.
- Replace the logo everywhere: overwrite public/temetro-logo.png with the new
1024² square mark (same aspect ratio as the old 500², so existing 32×32
next/image usages stay undistorted; no reference changes needed).
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
17 lines
810 B
TypeScript
17 lines
810 B
TypeScript
import { toastManager } from "@/components/ui/toast";
|
|
|
|
// Thin wrapper over COSS's (Base UI) toast manager so callers don't repeat the
|
|
// `{ type, title, description }` shape. COSS ships its own Sonner-style stacked
|
|
// toast — this is the app-wide notification entry point. The matching
|
|
// <ToastProvider> lives in app/layout.tsx.
|
|
export const notify = {
|
|
success: (title: string, description?: string) =>
|
|
toastManager.add({ type: "success", title, description }),
|
|
error: (title: string, description?: string) =>
|
|
toastManager.add({ type: "error", title, description }),
|
|
info: (title: string, description?: string) =>
|
|
toastManager.add({ type: "info", title, description }),
|
|
warning: (title: string, description?: string) =>
|
|
toastManager.add({ type: "warning", title, description }),
|
|
};
|