From 5508e6f6f39c0270292ecafb26caf399dd865985 Mon Sep 17 00:00:00 2001 From: ~Chiluka Akshitha <120377576+AKSHITHA-CHILUKA@users.noreply.github.com> Date: Thu, 8 Aug 2024 00:01:28 +0530 Subject: [PATCH] Create EventCard.jsx --- src/components/EventCard.jsx | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 src/components/EventCard.jsx diff --git a/src/components/EventCard.jsx b/src/components/EventCard.jsx new file mode 100644 index 0000000..589b886 --- /dev/null +++ b/src/components/EventCard.jsx @@ -0,0 +1,19 @@ +// src/components/EventCard.jsx +import React from 'react'; +import './EventCard.css'; // Optional: for styling +const EventCard = ({ event }) => { + const { title, date, description, imageUrl } = event; + return ( +
+ {imageUrl && ( + {title} + )} +
+

{title}

+

{new Date(date).toLocaleDateString()}

+

{description}

+
+
+ ); +}; +export default EventCard;