Skip to content

Commit

Permalink
feat: add conditional to condense times
Browse files Browse the repository at this point in the history
  • Loading branch information
samderanova committed Nov 4, 2023
1 parent e8d3048 commit 847d612
Showing 1 changed file with 9 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -93,9 +93,9 @@ const ClipboardSchedule: React.FC<ClipboardScheduleProps> = ({ schedule }) => {
endTime,
}) => {
const startTimeZoned = utcToZonedTime(
startTime,
"America/Los_Angeles",
),
startTime,
"America/Los_Angeles",
),
endTimeZoned = utcToZonedTime(
endTime,
"America/Los_Angeles",
Expand All @@ -118,10 +118,12 @@ const ClipboardSchedule: React.FC<ClipboardScheduleProps> = ({ schedule }) => {
<Col lg className={styles.mobileLocation}>
<span>
{location},{" "}
{dateTimeFormat.formatRange(
startTimeZoned,
endTimeZoned,
)}
{startTimeZoned === endTimeZoned
? dateTimeFormat.format(startTimeZoned)
: dateTimeFormat.formatRange(
startTimeZoned,
endTimeZoned,
)}
</span>
</Col>
</Row>
Expand Down

0 comments on commit 847d612

Please sign in to comment.