Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,14 @@
@extend .body-main;
margin-top: $space-xxl;
}

p {
margin: $space-sm 0;
}

:global(.details.mtop) {
margin-top: $space-xxl;
}
}

.coming-soon {
Expand Down
22 changes: 22 additions & 0 deletions src-ts/tools/learn/course-details/CourseDetailsPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,27 @@ const CourseDetailsPage: FC<{}> = () => {
)
}

function getCompletionSuggestion(): ReactNode {
if (!course) {
return
}

return progress?.status === UserCertificationProgressStatus.completed ? (
<></>
) : (
!!course.completionSuggestions?.length && (
<>
<h3 className='details mtop'>Suggestions for completing this course</h3>

<div
className={styles['text']}
dangerouslySetInnerHTML={{ __html: (course.completionSuggestions ?? []).join('<br /><br />') }}
></div>
</>
)
)
}

function getFooter(): ReactNode {
if (!resourceProvider) {
return
Expand Down Expand Up @@ -141,6 +162,7 @@ const CourseDetailsPage: FC<{}> = () => {

<div className={styles['description']}>
{getDescription()}
{getCompletionSuggestion()}
<div className={styles['coming-soon']}>
<PromoCourse />
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { LearnModule } from '../../lesson-provider'
export interface LearnCourse extends LearnModelBase {
certification: string
certificationId: string
completionSuggestions: Array<string>
estimatedCompletionTime: {
units: string
value: number
Expand Down