Replace any[] with proper Enrollment type interface in dashboard
Addresses type safety feedback on PR #836. The dashboard was using any[] for enrollments state, defeating TypeScript's type checking.
Changes:
- Added
Enrollmentinterface matching API response structure from/api/enrollment - Added
Courseinterface for nested course data with_count,prerequisites,tagsfields - Added
EnrollmentStatusunion type for status values - Replaced
useState<any[]>([])withuseState<Enrollment[]>([])on line 59
type Enrollment = {
id: string;
userId: string;
courseId: string;
status: EnrollmentStatus;
progress: number;
enrolledAt: string;
completedAt: string | null;
lastActivity: string;
course: Course;
stats: {
totalLessons: number;
completedLessons: number;
progressPercentage: number;
};
};
Types align with Prisma schema and computed stats from enrollment endpoint.
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.
The latest updates on your projects. Learn more about Vercel for GitHub.
| Project | Deployment | Preview | Comments | Updated (UTC) |
|---|---|---|---|---|
| vets-who-code-app | Dec 5, 2025 4:57am |
Just as a heads up, I was blocked by some firewall rules while working on your feedback. Expand below for details.
[!WARNING]
Firewall rules blocked me from connecting to one or more addresses (expand for details)
I tried to connect to the following addresses, but was blocked by firewall rules:
checkpoint.prisma.io
- Triggering command:
/usr/local/bin/node /usr/local/bin/node /home/REDACTED/work/vets-who-code-app/vets-who-code-app/node_modules/prisma/build/child {"product":"prisma","version":"6.10.1","cli_install_type":"local","information":"","local_timestamp":"2025-12-05T04:54:14Z","project_hash":"4713398e","cli_path":"/home/REDACTED/work/vets-who-code-app/vets-who-code-app/node_modules/.bin/prisma","cli_path_has(dns block)- Triggering command:
/usr/local/bin/node /usr/local/bin/node /home/REDACTED/work/vets-who-code-app/vets-who-code-app/node_modules/prisma/build/child {"product":"prisma","version":"6.10.1","cli_install_type":"local","information":"","local_timestamp":"2025-12-05T04:54:16Z","project_hash":"4713398e","cli_path":"/home/REDACTED/work/vets-who-code-app/vets-who-code-app/node_modules/.bin/prisma","cli_path_has(dns block)If you need me to access, download, or install something from one of these locations, you can either:
- Configure Actions setup steps to set up my environment, which run before the firewall is enabled
- Add the appropriate URLs or hosts to the custom allowlist in this repository's Copilot coding agent settings (admins only)