Skip to content

Commit b9a5038

Browse files
committed
use an unused variable
1 parent b76e61b commit b9a5038

File tree

1 file changed

+9
-7
lines changed

1 file changed

+9
-7
lines changed

source/views/calendar/event-row.js

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -88,8 +88,8 @@ function CalendarTimes({event, style}: {event: EventType, style: any}) {
8888
)
8989
}
9090

91-
let startTime = event.startTime.format('h:mm A')
92-
let endTime = event.endTime.format('h:mm A')
91+
let startTimeFormatted = event.startTime.format('h:mm A')
92+
let endTimeFormatted = event.endTime.format('h:mm A')
9393
let midnightTime = '12:00 AM'
9494

9595
let start, end
@@ -99,15 +99,17 @@ function CalendarTimes({event, style}: {event: EventType, style: any}) {
9999
} else if (multiDay) {
100100
// 12:00 PM to Jun. 25 3:00pm
101101
// Midnight to Jun. 25 <-- assuming the end time is also midnight
102-
start = event.startTime.format('h:mm A')
103-
const endFormat = endTime === midnightTime ? 'MMM. D' : 'MMM. D h:mm A'
102+
start = startTimeFormatted
103+
const endFormat = endTimeFormatted === midnightTime
104+
? 'MMM. D'
105+
: 'MMM. D h:mm A'
104106
end = `to ${event.endTime.format(endFormat)}`
105107
} else if (sillyZeroLength) {
106-
start = event.startTime.format('h:mm A')
108+
start = startTimeFormatted
107109
end = 'until ???'
108110
} else {
109-
start = event.startTime.format('h:mm A')
110-
end = event.endTime.format('h:mm A')
111+
start = startTimeFormatted
112+
end = endTimeFormatted
111113
}
112114

113115
start = start === midnightTime ? 'Midnight' : start

0 commit comments

Comments
 (0)