Skip to content

Commit

Permalink
Fix material link visibility for upcoming courses (#1264)
Browse files Browse the repository at this point in the history
  • Loading branch information
Redande committed Jun 20, 2024
1 parent 5429b54 commit 982151c
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion frontend/components/NewLayout/Courses/CourseCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
<CourseCardRoot ref={ref} {...props}>
<CourseCardLayout
Expand Down Expand Up @@ -464,7 +467,8 @@ const CourseCard = React.forwardRef<
}
moduleTags={<ModuleTags course={course} abbreviated={abbreviate} />}
link={
course?.link && (
course?.link &&
linkActive && (
<CourseLink href={course?.link} target="_blank">
{t("showCourse")}
</CourseLink>
Expand Down

0 comments on commit 982151c

Please sign in to comment.