Skip to content

Commit

Permalink
Visual fixes for monitor table (#5109)
Browse files Browse the repository at this point in the history
  • Loading branch information
jpople authored Jul 22, 2024
1 parent 40ab56a commit f810498
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
14 changes: 7 additions & 7 deletions clients/admin-ui/src/features/common/table/v2/cells.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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 = ({
Expand Down Expand Up @@ -63,13 +64,12 @@ export const RelativeTimestampCell = ({
if (!time) {
return <DefaultCell value="N/A" />;
}
return (
<DefaultCell
value={formatDistance(new Date(time), new Date(), {
addSuffix: true,
})}
/>
);

const timestamp = formatDistance(new Date(time), new Date(), {
addSuffix: true,
});

return <DefaultCell value={sentenceCase(timestamp)} />;
};

export const BadgeCellContainer = ({ children }: { children: ReactNode }) => (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ const ActionButton = ({
data-testid={`action-${title}`}
>
{icon}
<Text marginLeft={1} fontWeight="semibold" fontSize={12}>
<Text marginLeft={icon && 1} fontWeight="semibold" fontSize={12}>
{title}
</Text>
</Button>
Expand Down

0 comments on commit f810498

Please sign in to comment.