feat: Add date formatting utility functions and integrate them across components

This commit is contained in:
Chop
2025-06-19 23:29:06 +02:00
parent 306c96328e
commit 639179ed21
11 changed files with 118 additions and 74 deletions

View File

@@ -10,6 +10,7 @@ import PageContainer from "@/components/ui/PageContainer";
import PageHeader from "@/components/ui/PageHeader";
import SearchBar from "@/components/ui/SearchBar";
import { LoadingState } from "@/components/ui/States";
import { formatDate } from "@/lib/utils";
export default function ProjectListPage() {
const [projects, setProjects] = useState([]);
@@ -245,12 +246,14 @@ export default function ProjectListPage() {
title={project.plot}
>
{project.plot || "N/A"}
</td>
</td>{" "}
<td
className="px-2 py-3 text-xs text-gray-600 truncate"
title={project.finish_date}
>
{project.finish_date || "N/A"}
{project.finish_date
? formatDate(project.finish_date)
: "N/A"}
</td>
<td className="px-2 py-3 text-xs text-gray-600 text-center font-semibold">
{project.project_type === "design"