Skip to content

Commit

Permalink
refactor(events): remove unused sports details modal from Events page
Browse files Browse the repository at this point in the history
  • Loading branch information
Robert27 committed Dec 20, 2024
1 parent d0f8053 commit 4c66a1b
Showing 1 changed file with 0 additions and 102 deletions.
102 changes: 0 additions & 102 deletions rogue-thi-app/pages/events.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -227,108 +227,6 @@ export default function Events({ initialCampusEvents, sportsEvents }) {
</Button>
</Modal.Footer>
</Modal>
{/* SPORTS DETAILS MODAL */}
<Modal
show={!!focusedSport}
onHide={() => setFocusedSport(null)}
>
<Modal.Header closeButton>
<Modal.Title>
{focusedSport && focusedSport.title[locale]}
</Modal.Title>
</Modal.Header>
<Modal.Body>
<strong>{t('events.sports.modal.details.weekday')}</strong>
<p>{focusedSport && getLocalizedWeekday(focusedSport.weekday)}</p>

<strong>{t('events.sports.modal.details.time')}</strong>
<p>
{focusedSport && focusedSport.startTime}
{focusedSport &&
focusedSport.endTime &&
` - ${focusedSport.endTime}`}
</p>

<strong>{t('events.sports.modal.details.location')}</strong>
<p>{focusedSport && focusedSport.location}</p>
{focusedSport && focusedSport.description[locale] && (
<>
<strong>{t('events.sports.modal.details.description')}</strong>
<p className={styles.description}>
{focusedSport.description[locale]}
</p>
</>
)}

<h4 className={styles.modalHeader}>
{t('events.sports.modal.registration.header')}
</h4>
{focusedSport && (
<span className={styles.registration}>
{focusedSport && focusedSport.requiresRegistration ? (
<>
<CircleAlert
size={16}
className={styles.required}
/>
<span>{t('events.sports.modal.registration.required')}</span>
</>
) : (
<>
<CircleCheck
size={16}
className={styles.notRequired}
/>
<span>
{t('events.sports.modal.registration.notRequired')}
</span>
</>
)}
</span>
)}

{focusedSport && focusedSport.eMail && (
<>
<strong>{t('events.sports.modal.registration.email')}</strong>
<p>
<Link
href={`mailto:${focusedSport.eMail}`}
rel="noreferrer"
className={styles.item}
>
{focusedSport.eMail.toLowerCase()}
</Link>
</p>
</>
)}

{focusedSport && focusedSport.invitationLink && (
<>
<strong>
{t('events.sports.modal.registration.invitationLink')}
</strong>
<p>
<a
href={focusedSport.invitationLink}
target="_blank"
rel="noreferrer"
className={styles.item}
>
{focusedSport.invitationLink} <ExternalLink size={16} />
</a>
</p>
</>
)}
</Modal.Body>
<Modal.Footer>
<Button
variant="secondary"
onClick={() => setFocusedSport(null)}
>
{t('events.sports.modal.close')}
</Button>
</Modal.Footer>
</Modal>

<AppBody className={styles.container}>
<SwipeableTabs
Expand Down

0 comments on commit 4c66a1b

Please sign in to comment.