import { Link } from '@tanstack/react-router' import { ArrowLeft, Loader2 } from 'lucide-react' import { Badge, Button } from '../../components/ui' import { useAttendance } from './AttendanceProvider' import { StudentRow } from './StudentRow' export function ClassAttendanceView() { const { sessionInfo, studentsPending, studentsFailed, retryStudents, startTime, presentCount, saveAttendance, isSaving, } = useAttendance() return (
Volver al inicio {studentsPending ? (
) : null} {studentsFailed ? (

No pudimos cargar la lista de alumnos.

) : null} {sessionInfo ? ( <>

{sessionInfo.groupName}

{startTime ? `Hoy · ${startTime} hs` : 'Clase de hoy'}

{presentCount}/{sessionInfo.students.length} presentes
{sessionInfo.students.length === 0 ? (

Este grupo no tiene alumnos

Agregá miembros desde la ficha del grupo para tomar asistencia.

) : ( )} {sessionInfo.students.length > 0 ? (
) : null} ) : null}
) }