Certificates
- {overview.certificates.map(cert => (
-
-
🏅 {cert.studyTitle} — {new Date(cert.issuedAt).toLocaleDateString('en-US', { month: 'short', day: 'numeric', year: 'numeric' })}
-
-
View
-
-
-
- ))}
+ Finish every lesson in a study to earn a certificate of completion you can view, download and share.
+ {enrolledProgress.map(item => {
+ const cert = overview.certificates.find(c => c.studySlug === item.slug)
+ const ready = !cert && item.completedLessons >= item.totalLessons
+ return (
+ {
+ const isOpen = (e.currentTarget as HTMLDetailsElement).open
+ setCertOpen(prev => (prev[item.slug] === isOpen ? prev : { ...prev, [item.slug]: isOpen }))
+ }}
+ >
+
+ {cert ? '🏅' : '🎓'} {item.title}
+ {cert
+ ? Earned {new Date(cert.issuedAt).toLocaleDateString('en-US', { month: 'short', day: 'numeric', year: 'numeric' })}
+ : ready
+ ? Ready to claim
+ : {item.completedLessons} of {item.totalLessons} lessons}
+
+ {cert && (
+
+ View certificate
+
+
+ )}
+ { void refreshOverview() }} />
+
+ )
+ })}
)}