mirror of
https://github.com/rzmk/learnhouse.git
synced 2025-12-19 04:19:25 +00:00
feat: enhance course activity page with dynamic title and certification badge component
This commit is contained in:
parent
7539b27d0f
commit
e39c9c37ba
4 changed files with 288 additions and 55 deletions
|
|
@ -521,6 +521,8 @@ function ActivityClient(props: ActivityClientProps) {
|
|||
orgslug={orgslug}
|
||||
courseUuid={course.course_uuid}
|
||||
thumbnailImage={course.thumbnail_image}
|
||||
course={course}
|
||||
trailData={trailData}
|
||||
/>
|
||||
) : (
|
||||
<div className="space-y-4 pt-0">
|
||||
|
|
|
|||
|
|
@ -43,9 +43,13 @@ export async function generateMetadata(props: MetadataProps): Promise<Metadata>
|
|||
access_token || null
|
||||
)
|
||||
|
||||
// Check if this is the course end page
|
||||
const isCourseEnd = params.activityid === 'end';
|
||||
const pageTitle = isCourseEnd ? `Congratulations — ${course_meta.name} Course` : activity.name + ` — ${course_meta.name} Course`;
|
||||
|
||||
// SEO
|
||||
return {
|
||||
title: activity.name + ` — ${course_meta.name} Course`,
|
||||
title: pageTitle,
|
||||
description: course_meta.description,
|
||||
keywords: course_meta.learnings,
|
||||
robots: {
|
||||
|
|
@ -59,7 +63,7 @@ export async function generateMetadata(props: MetadataProps): Promise<Metadata>
|
|||
},
|
||||
},
|
||||
openGraph: {
|
||||
title: activity.name + ` — ${course_meta.name} Course`,
|
||||
title: pageTitle,
|
||||
description: course_meta.description,
|
||||
publishedTime: course_meta.creation_date,
|
||||
tags: course_meta.learnings,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue