1
0
mirror of https://github.com/kamranahmedse/developer-roadmap.git synced 2025-10-01 11:26:42 +02:00

refactor: ai-courses (#8327)

* Refactor ai courses

* Refactor

* Regenerate roadmap functionality

* Title and difficulty to refresh also

* Add course regeneration

* Improve the non paid user headings

* Update

* Improve back button logic

* Is paid user checks
This commit is contained in:
Kamran Ahmed
2025-03-14 03:05:07 +00:00
committed by GitHub
parent cc5585171c
commit 79c6e2be53
31 changed files with 815 additions and 452 deletions

View File

@@ -27,7 +27,7 @@ export function AICourseCard(props: AICourseCardProps) {
// Calculate progress percentage
const totalTopics = course.lessonCount || 0;
const completedTopics = course.progress?.done?.length || 0;
const completedTopics = course.done?.length || 0;
const progressPercentage =
totalTopics > 0 ? Math.round((completedTopics / totalTopics) * 100) : 0;