diff --git a/src/pages/Bootcamp.tsx b/src/pages/Bootcamp.tsx index 02ee94d..d8d1d34 100644 --- a/src/pages/Bootcamp.tsx +++ b/src/pages/Bootcamp.tsx @@ -408,22 +408,29 @@ export default function Bootcamp() { {isLessonCompleted(selectedLesson.id) ? ( <> - Sudah Selesai + Selesai ) : ( 'Tandai Selesai' )} - + {isBootcampCompleted ? ( + + ) : ( + + )} {/* Bootcamp completion review prompt */} diff --git a/src/pages/ProductDetail.tsx b/src/pages/ProductDetail.tsx index c8fa715..89b81bd 100644 --- a/src/pages/ProductDetail.tsx +++ b/src/pages/ProductDetail.tsx @@ -254,6 +254,9 @@ export default function ProductDetail() { ); case 'webinar': + // Check if webinar has ended + const webinarEnded = product.event_start && new Date(product.event_start) <= new Date(); + if (product.recording_url) { return (
@@ -274,14 +277,25 @@ export default function ProductDetail() {
); } - return product.meeting_link ? ( - - ) : Rekaman segera tersedia; + + // Only show "Gabung Webinar" if webinar hasn't ended and has meeting link + if (!webinarEnded && product.meeting_link) { + return ( + + ); + } + + // Webinar has ended but no recording yet + if (webinarEnded) { + return Rekaman segera tersedia; + } + + return null; case 'bootcamp': return (