Skip to content

Commit

Permalink
Bug: Hydration Error on Dashboard Page (#68)
Browse files Browse the repository at this point in the history
  • Loading branch information
Motormary authored Jun 14, 2024
1 parent 4550f2d commit 68f90a7
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { useRouter } from "next/navigation";
import { deleteEvent } from "@/actions/delete-event";
import { format } from "date-fns";
import { File, Pencil, Trash } from "lucide-react";
import { toast } from "sonner";

Expand Down Expand Up @@ -61,7 +62,8 @@ export default function EventsDashboardDetails({ event }) {
</Button>
</CardTitle>
<CardDescription>
Date: {new Date(event?.createdAt).toLocaleDateString()}
Date:{" "}
{event?.createdAt ? format(event?.createdAt, "MM/dd/yyyy") : ""}
</CardDescription>
</div>
<div className="ml-auto flex items-center gap-1">
Expand Down

0 comments on commit 68f90a7

Please sign in to comment.