Skip to content

Commit

Permalink
time display equal
Browse files Browse the repository at this point in the history
  • Loading branch information
Bl20052005 committed Jan 24, 2025
1 parent f92cbcd commit 0ae5bcd
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 4 deletions.
12 changes: 9 additions & 3 deletions apps/site/src/app/(main)/schedule/components/EventCard.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/* eslint-disable no-mixed-spaces-and-tabs */
import { SwordsIcon } from "lucide-react";
import { motion } from "framer-motion";

Expand All @@ -19,6 +20,7 @@ export default function EventCard({
description,
isHappening,
}: EventCardProps) {
console.log(title, startTime.getTime() === endTime.getTime());
return (
<div
className={`w-[90%] min-w-[200px] h-full bg-black border-4 border-white relative p-16 font-display max-lg:w-full ${
Expand Down Expand Up @@ -59,9 +61,13 @@ export default function EventCard({
{organization && <p className="text-xl">By: {organization}</p>}
</div>
<p className="text-xl">{`Time: ${
getTimeAndDates(startTime).compositeTimeHourMinute
} - ${getTimeAndDates(endTime).compositeTimeHourMinute} ${
getTimeAndDates(endTime).amPm
startTime.getTime() === endTime.getTime()
? `${getTimeAndDates(endTime).compositeTimeHourMinute} ${
getTimeAndDates(endTime).amPm
}`
: `${getTimeAndDates(startTime).compositeTimeHourMinute} - ${
getTimeAndDates(endTime).compositeTimeHourMinute
} ${getTimeAndDates(endTime).amPm}`
}`}</p>
</div>
</div>
Expand Down
6 changes: 5 additions & 1 deletion apps/site/src/app/(main)/schedule/components/EventPlaque.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,11 @@ export default forwardRef(function EventPlaque(
)}
</div>
<div className="text-lg">
<div>{`${start.compositeTimeHourMinute} - ${end.compositeTimeHourMinute} ${end.amPm}`}</div>
<div>
{startTime.getTime() === endTime.getTime()
? `${end.compositeTimeHourMinute} ${end.amPm}`
: `${start.compositeTimeHourMinute} - ${end.compositeTimeHourMinute} ${end.amPm}`}
</div>
</div>
</div>
<div
Expand Down

0 comments on commit 0ae5bcd

Please sign in to comment.