From 6e0d6448cda9c7501d3464676603c7c8c79a7ee6 Mon Sep 17 00:00:00 2001 From: Jenniffer Guzman Date: Fri, 27 Sep 2024 13:32:09 -0500 Subject: [PATCH 1/3] Upcoming Live Class was changed to the name of the cohort --- src/common/components/LiveEvent/index.jsx | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/src/common/components/LiveEvent/index.jsx b/src/common/components/LiveEvent/index.jsx index 09a8cdb9c..993c4a5ed 100644 --- a/src/common/components/LiveEvent/index.jsx +++ b/src/common/components/LiveEvent/index.jsx @@ -417,16 +417,18 @@ function LiveEvent({ flexDirection="column" marginLeft="10px" > - - {t('live-class')} - + {cohorts.length > 0 ? ( + + {cohorts[0].cohort.name} + + ) : null} Date: Tue, 15 Oct 2024 11:56:01 -0500 Subject: [PATCH 2/3] join class was changed to the name of the cohort --- src/common/components/LiveEvent/MainEvent.jsx | 2 +- src/common/components/LiveEvent/index.jsx | 22 +++++++++---------- 2 files changed, 11 insertions(+), 13 deletions(-) diff --git a/src/common/components/LiveEvent/MainEvent.jsx b/src/common/components/LiveEvent/MainEvent.jsx index a370a54e1..f41c7c432 100644 --- a/src/common/components/LiveEvent/MainEvent.jsx +++ b/src/common/components/LiveEvent/MainEvent.jsx @@ -27,7 +27,7 @@ function MainEvent({ const liveEndsAtDate = new Date(event?.ended_at || event?.ending_at); const isTeacher = cohorts.some(({ cohort, role }) => cohort.slug === event.cohort?.slug && ['TEACHER', 'ASSISTANT'].includes(role)); - const joinMessage = () => (isTeacher ? t('start-class') : t('join-class')); + const joinMessage = () => (isTeacher ? t('start-class') : event.cohort.name); return ( <> diff --git a/src/common/components/LiveEvent/index.jsx b/src/common/components/LiveEvent/index.jsx index 993c4a5ed..09a8cdb9c 100644 --- a/src/common/components/LiveEvent/index.jsx +++ b/src/common/components/LiveEvent/index.jsx @@ -417,18 +417,16 @@ function LiveEvent({ flexDirection="column" marginLeft="10px" > - {cohorts.length > 0 ? ( - - {cohorts[0].cohort.name} - - ) : null} + + {t('live-class')} + Date: Thu, 24 Oct 2024 18:18:05 +0200 Subject: [PATCH 3/3] Update MainEvent.jsx --- src/common/components/LiveEvent/MainEvent.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/common/components/LiveEvent/MainEvent.jsx b/src/common/components/LiveEvent/MainEvent.jsx index f41c7c432..b798934a2 100644 --- a/src/common/components/LiveEvent/MainEvent.jsx +++ b/src/common/components/LiveEvent/MainEvent.jsx @@ -27,7 +27,7 @@ function MainEvent({ const liveEndsAtDate = new Date(event?.ended_at || event?.ending_at); const isTeacher = cohorts.some(({ cohort, role }) => cohort.slug === event.cohort?.slug && ['TEACHER', 'ASSISTANT'].includes(role)); - const joinMessage = () => (isTeacher ? t('start-class') : event.cohort.name); + const joinMessage = () => (isTeacher ? t('start-class') : event?.cohort?.name); return ( <>