diff --git a/src/components/CourseLanding/CourseFloatingSidebar.tsx b/src/components/CourseLanding/CourseFloatingSidebar.tsx index f7ccdb94d..794272916 100644 --- a/src/components/CourseLanding/CourseFloatingSidebar.tsx +++ b/src/components/CourseLanding/CourseFloatingSidebar.tsx @@ -46,7 +46,7 @@ export function CourseFloatingSidebar(props: CourseFloatingSidebarProps) { queryClient, ); - const hasEnrolled = courseProgress?.startedAt ? true : false; + const hasEnrolled = courseProgress?.enrolledAt ? true : false; const isQueryLoading = isCourseProgressLoading || isCoursePricingLoading; useEffect(() => { diff --git a/src/components/CourseLanding/EnrollButton.tsx b/src/components/CourseLanding/EnrollButton.tsx index aa57f393e..6cccf7065 100644 --- a/src/components/CourseLanding/EnrollButton.tsx +++ b/src/components/CourseLanding/EnrollButton.tsx @@ -65,9 +65,9 @@ export function EnrollButton(props: EnrollButtonProps) { queryClient, ); - const hasEnrolled = !!courseProgress?.startedAt; + const hasEnrolled = !!courseProgress?.enrolledAt; const hasProgress = - courseProgress?.startedAt && courseProgress?.completed?.length > 0; + courseProgress?.enrolledAt && courseProgress?.completed?.length > 0; return (