Skip to content

Commit

Permalink
fix incorrect time
Browse files Browse the repository at this point in the history
  • Loading branch information
scffs committed Nov 13, 2023
1 parent 3437fcd commit b723c45
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/components/UI/Lesson/LessonCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ const LessonCard: FC<ILessonCard> = ({ lesson }) => {
const lessonDayOfWeek = lessonDate.toLocaleString('default', {
weekday: 'long',
})

const isLessonToday = isToday(lessonDate)

const displayDayStyles = {
Expand Down
3 changes: 2 additions & 1 deletion src/components/UI/TimeRemaining.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ const TimeRemaining: FunctionComponent<ITimeRemaining> = ({
const currentDate = new Date()

const lessonEndDate = convertStringToTime(endTime, lessonDate)
const lessonStartDate = convertStringToTime(startTime, lessonDate)

if (!lessonEndDate) {
return null
Expand All @@ -35,7 +36,7 @@ const TimeRemaining: FunctionComponent<ITimeRemaining> = ({
const timeRemainingText = getTimeRemaining(
currentDate,
lessonEndDate,
lessonDate
lessonStartDate
)

if (!timeRemainingText) {
Expand Down

0 comments on commit b723c45

Please sign in to comment.