Skip to content

Commit

Permalink
location and end time don't render when they don't exist
Browse files Browse the repository at this point in the history
  • Loading branch information
J164 committed Mar 2, 2025
1 parent 2630869 commit 0e9f825
Showing 1 changed file with 14 additions and 11 deletions.
25 changes: 14 additions & 11 deletions app/schedule/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,9 @@ const ScheduleItem: React.FC<ScheduleItemProps> = ({ event }) => {
className={styles.icon}
></div>
<p>
{timeToHourMinute(event.startTime)} -{" "}
{timeToHourMinute(event.endTime)}
{event.startTime === event.endTime
? timeToHourMinute(event.startTime)
: `${timeToHourMinute(event.startTime)} - ${timeToHourMinute(event.endTime)}`}
</p>
</div>
{event.sponsor && (
Expand All @@ -107,15 +108,17 @@ const ScheduleItem: React.FC<ScheduleItemProps> = ({ event }) => {
<p>{event.sponsor}</p>
</div>
)}
<div className={styles.textRow}>
<div
style={{
backgroundImage: `url(${GREEK_BUILDING?.src})`
}}
className={styles.icon}
></div>
<p>{locations}</p>
</div>
{locations.length > 0 && (
<div className={styles.textRow}>
<div
style={{
backgroundImage: `url(${GREEK_BUILDING?.src})`
}}
className={styles.icon}
></div>
<p>{locations}</p>
</div>
)}
<p className={styles.description}>{event.description}</p>
</div>
</div>
Expand Down

0 comments on commit 0e9f825

Please sign in to comment.