diff --git a/src/components/Course/CertificateView.tsx b/src/components/Course/CertificateView.tsx new file mode 100644 index 000000000..dedd6096c --- /dev/null +++ b/src/components/Course/CertificateView.tsx @@ -0,0 +1,42 @@ +import { useState } from 'react'; +import { Rating } from '../Rating/Rating'; + +type CertificateViewProps = { + currentCourseId: string; +}; + +export function CertificateView(props: CertificateViewProps) { + const { currentCourseId } = props; + + const [rating, setRating] = useState(0); + + return ( +
+
+

Congratulations!

+

+ You finished the course. Download the completion certificate below and + share it with the world. +

+ +
+ +
+ setRating(rating)} + starSize={36} + /> + Rate your experience +
+
+ ); +} diff --git a/src/pages/learn/[courseId]/certificate.astro b/src/pages/learn/[courseId]/certificate.astro index fcbc2f674..6cbaf9b6a 100644 --- a/src/pages/learn/[courseId]/certificate.astro +++ b/src/pages/learn/[courseId]/certificate.astro @@ -1,4 +1,5 @@ --- +import { CertificateView } from '../../../components/Course/CertificateView'; import { CourseLayout } from '../../../components/Course/CourseLayout'; import SkeletonLayout from '../../../layouts/SkeletonLayout.astro'; import { @@ -60,6 +61,6 @@ const { course } = Astro.props; chapters={course.chapters} client:load > - Hello +