diff --git a/src/app/dashboard/layout.tsx b/src/app/dashboard/layout.tsx index da7a092..9c25523 100644 --- a/src/app/dashboard/layout.tsx +++ b/src/app/dashboard/layout.tsx @@ -32,15 +32,15 @@ export default function DashboardLayout({ children }: { children: ReactNode }) { return () => document.removeEventListener("mousedown", handleClickOutside) }, []) - const userInitials = user ? user.name.split(" ").map(n => n[0]).join("").toUpperCase() : "DS" + const userInitials = user ? user.name.split(" ").filter(n => /^[a-zA-Z]/.test(n)).slice(0, 2).map(n => n[0]).join("").toUpperCase() : "DS" const targetExamLabel = user?.target_exam === "JEE_Main" ? "JEE Main" : user?.target_exam === "JEE_Advanced" ? "JEE Advanced" : user?.target_exam === "NEET" ? "NEET" : "NEET/JEE" return (
{/* Sidebar */}