diff --git a/components/home/RecentEvent.tsx b/components/home/RecentEvent.tsx index 322ba96..cda4555 100644 --- a/components/home/RecentEvent.tsx +++ b/components/home/RecentEvent.tsx @@ -6,7 +6,7 @@ import Link from "next/link"; import useEventCollection from "@/hooks/useEventCollection"; import FetchError from "../custom/FetchError"; -import { motion } from "framer-motion"; +import * as Tabs from "@radix-ui/react-tabs"; const RecentEvent = () => { const { data: events, isLoading, error } = useEventCollection(); @@ -38,7 +38,7 @@ const RecentEvent = () => { } return ( -
+
+ ); +}; - {/* Separator */} -
-
+const EventCard = ({ event, type }: { event: any; type: 'upcoming' | 'recent' }) => { + if (type === 'upcoming') { + return ( + +
+
+ + {format(new Date(event.eventDate), "MMM")} + + + {format(new Date(event.eventDate), "d")} + +
+ +
+

+ {event.title} +

+

+ {event.description} +

+
+ +
+ +
+
+ + ); + } + + return ( + +
+
+ Event Image +
- {/* Recent Events Column */} - -
-

- Recent Events -
-

+
+
+
+ + completed +
+

+ {event.title} +

+

+ {event.description} +

-
- {recent && recent.length > 0 ? ( - recent.map((event) => ( - -
-
- Event Image -
-
- -
-
-
- - completed -
-

- {event.title} -

-

- {event.description} -

-
- -
- - - {format(new Date(event.eventDate), "MMM do, yyyy")} - -
- -
-
-
-
- - )) - ) : ( -
- No recent events found. -
- )} +
+ + + {format(new Date(event.eventDate), "MMM do, yyyy")} + +
+ +
- +
- -
+ ); }; +const JoinCommunityCard = () => ( +
+
+
+

Join the Community

+

Don't miss out on future events and opportunities from the biggest engineering body on campus.

+ + View All Events + +
+
+); + +const EmptyEvents = ({ message }: { message: string }) => ( +
+ {message} +
+); + export default RecentEvent;