Skip to content

Commit

Permalink
fix: fix created_at property not being formatted
Browse files Browse the repository at this point in the history
  • Loading branch information
mainawycliffe authored and moshloop committed Sep 3, 2024
1 parent 2a99e38 commit 5d3e841
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions src/components/Topology/TopologyCard/FormatProperty.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Property as PropertyD } from "@flanksource-ui/api/types/topology";
import { Age } from "@flanksource-ui/ui/Age";
import { FiExternalLink } from "react-icons/fi";
import { Property as PropertyD } from "../../../api/types/topology";
import { Age } from "../../../ui/Age";
import {
FormatPropertyCPUMemory,
FormatPropertyCurrency,
Expand All @@ -26,7 +26,13 @@ export function FormatProperty({

let { text } = property;

if (property.name === "created" && typeof text === "string") {
if (
(property.name === "created" ||
property.name === "created_at" ||
property.name === "updated_at" ||
property.type === "age") &&
typeof text === "string"
) {
return <Age from={text} />;
}

Expand Down

0 comments on commit 5d3e841

Please sign in to comment.