Skip to content

Commit

Permalink
Hotfix 0.1 broken events page (#113)
Browse files Browse the repository at this point in the history
* Update date attribute name

* Uncomment blocked single events page
  • Loading branch information
collinskasyoki authored Jan 22, 2024
1 parent 986be89 commit 2c1c934
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ function SingleEvent() {
/>
<div className="px-20">
<div className="flex flex-row justify-between pt-10 pb-2 ">
<h2>{format(new Date(oneEvent.date), "EEE MMM d, yyyy")}</h2>
<h2>{format(new Date(oneEvent.start_date), "EEE MMM d, yyyy")}</h2>
<div className="flex flex-row justify-between ">
<div className="">
<svg
Expand Down Expand Up @@ -121,7 +121,7 @@ function SingleEvent() {
</p>
</div>
<div className="text-sm text-[#323433] font-light mb-6 ml-8">
<p>{format(new Date(oneEvent.date), "EEE MMM d, yyyy")}</p>
<p>{format(new Date(oneEvent.start_date), "EEE MMM d, yyyy")}</p>
<p>
{format(
parseDate(oneEvent.start_time, "HH:mm:ss", new Date()),
Expand Down
4 changes: 2 additions & 2 deletions src/APP/pages/events/sections/eventsSection/Events.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ function Events({ events, isVertical }) {
<div className={isVertical ? verticalContainer : horizontalContainer}>
{events && Array.isArray(events)
? events.map(
({ id, name, date, location, mode, poster, city, start_time }) => {
({ id, name, start_date, location, mode, poster, city, start_time }) => {
const buttonColor =
mode === "Virtual"
? "bg-red-800 hover:bg-red-800"
Expand All @@ -41,7 +41,7 @@ function Events({ events, isVertical }) {
<div className="p-5 text-[#323433]">
<h5 className="mb-2 text-sm font-semibold">{name}</h5>
<p className="mb-3 font-medium text-xs whitespace-nowrap">
{format(new Date(date), "EEE, MMM d, yyyy")}{" "}
{format(new Date(start_date), "EEE, MMM d, yyyy")}{" "}
{format(
parse(start_time, "HH:mm:ss", new Date()),
"h:mm a"
Expand Down
8 changes: 4 additions & 4 deletions src/router/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -106,10 +106,10 @@ const router = createBrowserRouter([
// path: "/donate/:id",
// element: <SingleProductDonation />,
// },
// {
// path: "/events/:id", // New route path
// element: <SingleEvent />,
// },
{
path: "/events/:id",
element: <SingleEvent />,
},
// {
// path: "/signup",
// element: <SignUp />,
Expand Down

0 comments on commit 2c1c934

Please sign in to comment.