Skip to content

Commit b871605

Browse files
Merge pull request #327 from topcoder-platform/TCA-488_twitter
TCA-488 Shorten Social Share URL -> develop
2 parents 5298fb2 + f7d670b commit b871605

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src-ts/tools/learn/course-certificate/certificate-view/CertificateView.tsx

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,14 +52,18 @@ const CertificateView: FC<CertificateViewProps> = (props: CertificateViewProps)
5252
ready: courseReady,
5353
}: CoursesProviderData = useCourses(props.provider, props.certification)
5454

55+
function getCertTitle(user: string): string {
56+
return `${user} - ${course?.title} Certification`
57+
}
58+
5559
const certUrl: string = getUserCertificateSsr(
5660
props.provider,
5761
props.certification,
5862
props.profile.handle,
59-
`Topcoder Academy Certificate for ${course?.title} for ${props.profile.handle}`
63+
getCertTitle(props.profile.handle),
6064
)
6165

62-
const certificationTitle: string = `${userName || props.profile.handle} - ${course?.title} Certification`
66+
const certificationTitle: string = getCertTitle(userName || props.profile.handle)
6367

6468
const {
6569
certifications: [completedCertificate],

0 commit comments

Comments
 (0)