@@ -68,7 +68,7 @@ export const UpdateDetails = ({
{update.version && (
- {fmt_verison(update.version)}
+ {fmt_version(update.version)}
)}
diff --git a/frontend/src/components/updates/header.tsx b/frontend/src/components/updates/header.tsx
index 6f2672de9..aa457e526 100644
--- a/frontend/src/components/updates/header.tsx
+++ b/frontend/src/components/updates/header.tsx
@@ -10,7 +10,7 @@ import { Button } from "@ui/button";
import { Calendar, User } from "lucide-react";
import { UpdateDetails, UpdateUser } from "./details";
import { ResourceComponents } from "@components/resources";
-import { cn, fmt_verison } from "@lib/utils";
+import { cn, fmt_version } from "@lib/utils";
import { Types } from "@monitor/client";
const fmt_date = (d: Date) =>
@@ -38,7 +38,7 @@ export const SingleUpdate = ({ update }: { update: Types.UpdateListItem }) => {
{update.operation.match(/[A-Z][a-z]+|[0-9]+/g)?.join(" ")}
- {fmt_verison(update.version)}
+ {fmt_version(update.version)}
diff --git a/frontend/src/components/updates/resource.tsx b/frontend/src/components/updates/resource.tsx
index 6bd89026d..6bc9e9938 100644
--- a/frontend/src/components/updates/resource.tsx
+++ b/frontend/src/components/updates/resource.tsx
@@ -20,7 +20,7 @@ import {
import { Link } from "react-router-dom";
import { Types } from "@monitor/client";
import { Section } from "@components/layouts";
-import { fmt_update_date, fmt_verison } from "@lib/utils";
+import { fmt_update_date, fmt_version } from "@lib/utils";
import { UpdateDetails, UpdateUser } from "./details";
import { UpdateStatus } from "@monitor/client/dist/types";
@@ -56,7 +56,7 @@ const UpdateCard = ({ update }: { update: Types.UpdateListItem }) => {
{update.operation}
- {fmt_verison(update.version)}
+ {fmt_version(update.version)}
diff --git a/frontend/src/lib/utils.ts b/frontend/src/lib/utils.ts
index 64e5bae1c..56f344ab3 100644
--- a/frontend/src/lib/utils.ts
+++ b/frontend/src/lib/utils.ts
@@ -20,10 +20,16 @@ export const RESOURCE_TARGETS: UsableResource[] = [
"Procedure",
];
-export const fmt_update_date = (d: Date) =>
- `${d.getDate()}/${d.getMonth() + 1} @ ${d.getHours()}:${d.getMinutes()}`;
+export const fmt_update_date = (d: Date) => {
+ return `${d.getDate()}/${d.getMonth() + 1} @ ${d.getHours()}:${d.getMinutes()}`;
+};
-export const fmt_verison = (version: Types.Version | undefined) => {
+export const fmt_date_with_minutes = (d: Date) => {
+ // return `${d.toLocaleDateString()} ${d.toLocaleTimeString()}`;
+ return d.toLocaleString()
+}
+
+export const fmt_version = (version: Types.Version | undefined) => {
if (!version) return "...";
const { major, minor, patch } = version;
if (major === 0 && minor === 0 && patch === 0) return "latest";