From c38c226dbd4e92631736566a9d6776bd3cd9f2a4 Mon Sep 17 00:00:00 2001
From: AmirReza Jamali
Date: Sun, 3 May 2026 11:00:03 +0330
Subject: [PATCH] refactor(tender-details): integrate unixToDate for date
formatting and enhance layout consistency
- Replaced msToDate with unixToDate for application, publication, submission, and tender deadlines to ensure accurate date representation.
- Improved ShowcaseSection layout by adjusting class names for better visual consistency across various sections.
- Enhanced error message formatting for improved readability.
---
src/app/tenders/[details]/page.tsx | 89 +++++++++++++++++++++++-------
src/utils/shared.ts | 2 +-
2 files changed, 69 insertions(+), 22 deletions(-)
diff --git a/src/app/tenders/[details]/page.tsx b/src/app/tenders/[details]/page.tsx
index 3729900..7250468 100644
--- a/src/app/tenders/[details]/page.tsx
+++ b/src/app/tenders/[details]/page.tsx
@@ -7,7 +7,11 @@ import Status from "@/components/ui/Status";
import { useTenderDetailQuery } from "@/hooks/queries";
import { useGetFlagQuery } from "@/hooks/queries/useFlagsQueries";
import { cn } from "@/lib/utils";
-import { isValidAlpha2CountryCode, msToDate, truncateString } from "@/utils/shared";
+import {
+ isValidAlpha2CountryCode,
+ truncateString,
+ unixToDate,
+} from "@/utils/shared";
import getSymbolFromCurrency from "currency-symbol-map";
import Link from "next/link";
import { use } from "react";
@@ -82,11 +86,12 @@ const TenderDetails = ({ params }: IProps) => {
We couldn't load this tender
- Check your connection or try again. You can go back to the tender list anytime.
+ Check your connection or try again. You can go back to the tender
+ list anytime.
Back to tenders
@@ -114,13 +119,15 @@ const TenderDetails = ({ params }: IProps) => {