Skip to content

Commit

Permalink
Chore: Fix Date
Browse files Browse the repository at this point in the history
  • Loading branch information
AntGa committed Oct 14, 2024
1 parent 65a6af6 commit 28098a1
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/components/projectspage/PastProjectsList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ type PastProjectsListProps = {
};

export default function PastProjectsList({ projects }: PastProjectsListProps) {
console.log(projects);
return (
<div>
{projects.map((project, index) => {
Expand Down Expand Up @@ -66,7 +67,11 @@ export default function PastProjectsList({ projects }: PastProjectsListProps) {
<div className="index-event-details">
<div className="index-event-date-and-title">
<div className="index-event-date">
<h5>{project.date?.toString() || "No date available"}</h5>
<h5>
{project.date
? `${new Date(project.date).toLocaleDateString("en-US", { weekday: "long", month: "long", day: "numeric" })}, ${new Date(project.date).toLocaleTimeString("en-US", { hour: "2-digit", minute: "2-digit" })}`
: "No date available"}
</h5>
</div>
<div className="index-event-title">
<h2>
Expand Down

0 comments on commit 28098a1

Please sign in to comment.