"use client"; import React, { useState } from 'react'; import { useTeachers } from '../hooks/useTeachers'; import { useAttendance } from '../hooks/useAttendance'; import ClockButton from './ClockButton'; function roundTo15Minutes(date = new Date()) { const ms = 1000 * 60 * 15; // 15 minutes in ms return new Date(Math.round(date.getTime() / ms) * ms); } function formatTime(ts?: number) { if (!ts) return '--:--'; const date = new Date(ts); return date.toLocaleTimeString([], { hour: '2-digit', minute: '2-digit' }); } export default function TeacherList() { const { teachers, addTeacher } = useTeachers(); const { todayRecords } = useAttendance(); const [name, setName] = useState(''); return (