Fix: Localized Dates

This commit is contained in:
2026-03-06 12:58:23 +05:45
parent 77e3a1fcec
commit 55847f387e
8 changed files with 122 additions and 24 deletions
+2 -5
View File
@@ -48,6 +48,7 @@ import {
} from "@/components/ui/alert-dialog";
import { useToast } from "@/hooks/use-toast";
import { api, SSHKey, SSHCertificate, ApiError, PrincipalOption, MyPrincipalsOrg, DeptCertPolicy } from "@/lib/api";
import { formatDate as _formatDate } from "@/lib/date";
// ──────────────────────────────────────────────────────────────────────────────
// Helpers
@@ -55,11 +56,7 @@ import { api, SSHKey, SSHCertificate, ApiError, PrincipalOption, MyPrincipalsOrg
function formatDate(dateStr: string | null): string {
if (!dateStr) return "—";
return new Date(dateStr).toLocaleDateString(undefined, {
year: "numeric",
month: "short",
day: "numeric",
});
return _formatDate(dateStr);
}
function CopyButton({ text }: { text: string }) {