From 630ea7d32fd9e9a756d17d602fc600d871052143 Mon Sep 17 00:00:00 2001 From: TheMaddax Date: Mon, 14 Oct 2024 20:27:39 -0500 Subject: [PATCH] Fixed home, calendar, and mobile elements --- client/src/components/Calendar.tsx | 10 ++++------ client/src/components/EventCard.tsx | 2 +- client/src/components/Home.tsx | 9 ++++----- 3 files changed, 9 insertions(+), 12 deletions(-) diff --git a/client/src/components/Calendar.tsx b/client/src/components/Calendar.tsx index 5b19a04..e4b0f21 100644 --- a/client/src/components/Calendar.tsx +++ b/client/src/components/Calendar.tsx @@ -16,13 +16,11 @@ export const formatDateRange = (startDate: string, startTime: string, endDate: s const end = parseISO(`${endDate}T${endTime}`); if (isSameDay(start, end)) { - return `${format(start, 'MMMM d, yyyy')} ${formatTime(startDate, startTime)} - ${formatTime(endDate, endTime)}`; + return `${format(start, 'MMMM d, yyyy')}\n${formatTime(startDate, startTime)} - ${formatTime(endDate, endTime)}`; } else { - return `${format(start, 'MMMM d, yyyy h:mm a')} - ${format(end, 'MMMM d, yyyy h:mm a')}`; + return `${format(start, 'MMMM d, yyyy')}\n${formatTime(startDate, startTime)} - ${format(end, 'MMMM d, yyyy')}\n${formatTime(endDate, endTime)}`; } -}; - -const EventPopup: React.FC<{ event: Event; position: { top: number; left: number }; onClose: () => void }> = ({ event, position, onClose }) => ( +};const EventPopup: React.FC<{ event: Event; position: { top: number; left: number }; onClose: () => void }> = ({ event, position, onClose }) => ( e.stopPropagation()} >

{event.title}

-

{formatDateRange(event.date, event.startTime, event.date, event.endTime)}

+

{formatDateRange(event.date, event.startTime, event.date, event.endTime)}

{event.description}

Contact: {event.pointOfContact}

diff --git a/client/src/components/EventCard.tsx b/client/src/components/EventCard.tsx index f84b657..e0d70e3 100644 --- a/client/src/components/EventCard.tsx +++ b/client/src/components/EventCard.tsx @@ -15,7 +15,7 @@ const EventCard: React.FC = ({ event }) => { className="bg-white rounded-lg shadow-md p-4 w-full max-w-xs" >

{event.title}

-

{event.formattedDateRange}

+

{event.formattedDateRange}

{event.description}

Contact: {event.pointOfContact}

diff --git a/client/src/components/Home.tsx b/client/src/components/Home.tsx index f778aa9..d4237c8 100644 --- a/client/src/components/Home.tsx +++ b/client/src/components/Home.tsx @@ -34,9 +34,8 @@ const Home: React.FC = () => {

Welcome to MCDi

- -
-
+
+
{ content="Just as Montana's vast landscapes showcase breathtaking vistas, our Deaf community brings unique perspectives and experiences to the table. We're proud to celebrate Deaf culture, language, and traditions that enrich our human kaleidoscope." />
-
+

Upcoming Events

{upcomingEvents.map((event, index) => ( @@ -91,4 +90,4 @@ const InfoCard: React.FC<{ title: string; content: string }> = ({ title, content ); -export default Home; +export default Home; \ No newline at end of file