From b103e97b422d5ea3a0228a78fa9ae5085083a0fb Mon Sep 17 00:00:00 2001 From: iamkiddy Date: Sat, 6 Dec 2025 01:23:04 +0000 Subject: [PATCH] Enhance dashboard greeting with user-specific welcome message - Integrated user authentication to display a personalized welcome message on the admin dashboard, replacing the static greeting with the user's first name. - Improved user experience by making the dashboard more engaging and tailored to individual users. --- app/(admin)/admin/dashboard/page.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/(admin)/admin/dashboard/page.tsx b/app/(admin)/admin/dashboard/page.tsx index 2f41b86..4c7e10d 100644 --- a/app/(admin)/admin/dashboard/page.tsx +++ b/app/(admin)/admin/dashboard/page.tsx @@ -25,6 +25,7 @@ import { import { useAppTheme } from "@/components/ThemeProvider"; import { getAllUsers } from "@/lib/actions/auth"; import { getAppointmentStats, listAppointments } from "@/lib/actions/appointments"; +import { useAuth } from "@/hooks/useAuth"; import { toast } from "sonner"; import type { User } from "@/lib/models/auth"; import type { Appointment } from "@/lib/models/appointments"; @@ -62,6 +63,7 @@ export default function Dashboard() { const [loading, setLoading] = useState(true); const [timePeriod, setTimePeriod] = useState("last_month"); const { theme } = useAppTheme(); + const { user } = useAuth(); const isDark = theme === "dark"; useEffect(() => { @@ -254,7 +256,7 @@ export default function Dashboard() {

- Welcome Back! Hammond + Welcome Back! {user?.first_name || ""}

Here's an overview of your practice today