import Link from "next/link" import { ArrowLeft, GraduationCap } from "lucide-react" import { Avatar, AvatarFallback, AvatarImage } from "@/shared/components/ui/avatar" import { Badge } from "@/shared/components/ui/badge" import { Button } from "@/shared/components/ui/button" import type { ChildDashboardData } from "@/modules/parent/types" const getInitials = (name: string | null) => { if (!name) return "S" return name.slice(0, 2).toUpperCase() } export function ChildDetailHeader({ child }: { child: ChildDashboardData }) { const { basicInfo } = child return (
{getInitials(basicInfo.name)}

{basicInfo.name ?? "Unnamed"}

{basicInfo.className ? ( {basicInfo.className} ) : null} {basicInfo.gradeName ? ( {basicInfo.gradeName} ) : null} {basicInfo.relation ? · {basicInfo.relation} : null} · {basicInfo.email}
) }