From 54bb72b60cff3f97c5aea1863b3393df1086ec94 Mon Sep 17 00:00:00 2001 From: Alison Langston <46360176+alangsto@users.noreply.github.com> Date: Fri, 1 Mar 2024 08:17:27 -0500 Subject: [PATCH] feat: update chat visibility (#1310) --- src/courseware/course/chat/Chat.jsx | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/src/courseware/course/chat/Chat.jsx b/src/courseware/course/chat/Chat.jsx index 72739d1c44..6f56406531 100644 --- a/src/courseware/course/chat/Chat.jsx +++ b/src/courseware/course/chat/Chat.jsx @@ -41,16 +41,12 @@ const Chat = ({ const date = new Date(); const utcDate = date.toISOString(); - const enrollmentStartDate = course.enrollmentStart || utcDate; - const startDate = course.start || enrollmentStartDate; - const enrollmentEndDate = course.enrollmentEnd || utcDate; - const endDate = course.end || enrollmentEndDate; + const startDate = course.start || utcDate; + const endDate = course.end || utcDate; return ( - startDate <= enrollmentStartDate - && enrollmentStartDate <= utcDate - && utcDate <= enrollmentEndDate - && enrollmentEndDate <= endDate + startDate <= utcDate + && utcDate <= endDate ); };