Skip to content

Commit

Permalink
small fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
choden-dev committed Oct 19, 2024
1 parent b5cf91f commit 749bd3c
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 10 deletions.
12 changes: 6 additions & 6 deletions client/src/components/composite/EventsView/EventsView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ const EventsPage = ({
}

/**
* Determine the ordering of each the lists
* Start dates ascending for upcoming and current events
*/
buf.upcomingAndCurrentEvents.sort(
(
Expand Down Expand Up @@ -131,12 +131,12 @@ const EventsPage = ({
)
}, [selectedEventObject])

const formattedCurrentEvents: IEventsCardPreview[] =
const previewCurrentEvents: IEventsCardPreview[] =
eventList.upcomingAndCurrentEvents?.map((event) => {
return EventRenderingUtils.previewTransformer(event, setSelectedEventId)
}) || []

const formattedPastEvents: IEventsCardPreview[] =
const previewPastEvents: IEventsCardPreview[] =
eventList.pastEvents?.map((event) => {
return EventRenderingUtils.previewTransformer(event, setSelectedEventId)
}) || []
Expand All @@ -155,17 +155,17 @@ const EventsPage = ({
Upcoming Events
</h5>
)}
{formattedCurrentEvents.map((event) => (
{previewCurrentEvents.map((event) => (
<EventsCardPreview key={event.title} {...event} />
))}

{formattedPastEvents.map((event) => (
{previewPastEvents.map((event) => (
<EventsCardPreview key={event.title} {...event} />
))}
</>
)}

{hasMoreEvents && (
{hasMoreEvents && !selectedEventId && (
<Button
variant="default"
onClick={fetchMoreEvents}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,18 +107,20 @@ const EventDetailed = ({
<Divider />

<div className="flex flex-col gap-4">
<div className="text-left">{content}</div>
<div className="whitespace-pre-line text-left">{content}</div>

{signUpOpenDate &&
!isPastEvent &&
googleFormLink &&
(signUpOpenDate <= new Date() ? (
<>
<h5 className="font-bold uppercase">
<h5 className="font-bold uppercase">Sign Ups Open!</h5>
<h5 className="text-dark-blue-100 font-bold uppercase italic">
<a href={googleFormLink} target="_blank" rel="noreferrer">
Sign Ups Open!
CLICK ME TO GO TO FORM
</a>
</h5>
{googleFormLink && <iframe src={googleFormLink} />}
<iframe height={"500"} src={googleFormLink} />
</>
) : (
<>
Expand Down

0 comments on commit 749bd3c

Please sign in to comment.