Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ability to add action when user finish the course #273

Merged
merged 3 commits into from
Apr 17, 2023
Merged

Conversation

rudzky
Copy link
Contributor

@rudzky rudzky commented Apr 17, 2023

No description provided.

@@ -201,6 +203,8 @@ export const CourseAgenda: FC<CourseAgendaProps> = (props) => {
finishedTopicIds,
currentTopicId: currentNotLockedTopicId,
}}
allTopicsLength={allTopics.length}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you can grab this number from lessons prop

eg

export const getFlatTopics = (lessons: API.Lesson[]): API.Topic[] => {
  return lessons.reduce((acc, curr) => {
    return [...acc, ...(curr.lessons ? getFlatTopics(curr.lessons) : []), ...(curr.topics ?? [])];
  }, [] as API.Topic[]) as API.Topic[];
  
 const l = getFlatTopics(lessons).length  

@qunabu qunabu merged commit 99dbb39 into main Apr 17, 2023
@qunabu qunabu deleted the release/0.0.86 branch April 17, 2023 12:26
@github-actions
Copy link

no AXE a11y errors

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants