From 982151ca333ec1a0c234e5fbcb1df86c24118a5f Mon Sep 17 00:00:00 2001 From: Antti Leinonen Date: Thu, 20 Jun 2024 17:32:43 +0300 Subject: [PATCH] Fix material link visibility for upcoming courses (#1264) --- frontend/components/NewLayout/Courses/CourseCard.tsx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/frontend/components/NewLayout/Courses/CourseCard.tsx b/frontend/components/NewLayout/Courses/CourseCard.tsx index b4d19afab..9725207b3 100644 --- a/frontend/components/NewLayout/Courses/CourseCard.tsx +++ b/frontend/components/NewLayout/Courses/CourseCard.tsx @@ -429,6 +429,9 @@ const CourseCard = React.forwardRef< const courseStudyModule = studyModule ?? course.study_modules[0]?.slug ?? "other" + const linkActive = + course?.status != "Upcoming" || course?.upcoming_active_link + return ( } link={ - course?.link && ( + course?.link && + linkActive && ( {t("showCourse")}