From f81049852796f598143311b4d720332fbcaf7224 Mon Sep 17 00:00:00 2001 From: jpople Date: Mon, 22 Jul 2024 13:25:37 -0500 Subject: [PATCH] Visual fixes for monitor table (#5109) --- .../src/features/common/table/v2/cells.tsx | 14 +++++++------- .../data-discovery-and-detection/ActionButton.tsx | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/clients/admin-ui/src/features/common/table/v2/cells.tsx b/clients/admin-ui/src/features/common/table/v2/cells.tsx index b599de6497..b5964d7f79 100644 --- a/clients/admin-ui/src/features/common/table/v2/cells.tsx +++ b/clients/admin-ui/src/features/common/table/v2/cells.tsx @@ -20,6 +20,7 @@ import { ChangeEvent, ReactNode } from "react"; import { getErrorMessage, isErrorResult } from "~/features/common/helpers"; import ConfirmationModal from "~/features/common/modals/ConfirmationModal"; import { errorToastParams } from "~/features/common/toast"; +import { sentenceCase } from "~/features/common/utils"; import { RTKResult } from "~/types/errors"; export const DefaultCell = ({ @@ -63,13 +64,12 @@ export const RelativeTimestampCell = ({ if (!time) { return ; } - return ( - - ); + + const timestamp = formatDistance(new Date(time), new Date(), { + addSuffix: true, + }); + + return ; }; export const BadgeCellContainer = ({ children }: { children: ReactNode }) => ( diff --git a/clients/admin-ui/src/features/data-discovery-and-detection/ActionButton.tsx b/clients/admin-ui/src/features/data-discovery-and-detection/ActionButton.tsx index 2d4cf69473..3d1e7fb112 100644 --- a/clients/admin-ui/src/features/data-discovery-and-detection/ActionButton.tsx +++ b/clients/admin-ui/src/features/data-discovery-and-detection/ActionButton.tsx @@ -23,7 +23,7 @@ const ActionButton = ({ data-testid={`action-${title}`} > {icon} - + {title}