From 23dea07f6e53da91f87078749f07bd95c9e65983 Mon Sep 17 00:00:00 2001 From: Vojtech Simetka Date: Sun, 24 Apr 2022 21:40:41 +0500 Subject: [PATCH] feat: add aditional information to the stamps overview (#349) --- src/pages/stamps/PostageStamp.tsx | 5 ++++- src/pages/stamps/StampsTable.tsx | 9 +++++++++ 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/src/pages/stamps/PostageStamp.tsx b/src/pages/stamps/PostageStamp.tsx index 880e6af..4b2a36a 100644 --- a/src/pages/stamps/PostageStamp.tsx +++ b/src/pages/stamps/PostageStamp.tsx @@ -9,10 +9,13 @@ interface Props { } export function PostageStamp({ stamp, shorten }: Props): ReactElement { + const batchId = shorten ? stamp.batchID.slice(0, 8) : stamp.batchID + const label = `${batchId}${stamp.label ? ` - ${stamp.label}` : ''}` + return ( - {shorten ? stamp.batchID.slice(0, 8) : stamp.batchID} + {label} diff --git a/src/pages/stamps/StampsTable.tsx b/src/pages/stamps/StampsTable.tsx index d3bfade..8df6e38 100644 --- a/src/pages/stamps/StampsTable.tsx +++ b/src/pages/stamps/StampsTable.tsx @@ -4,6 +4,7 @@ import ExpandableList from '../../components/ExpandableList' import ExpandableListItem from '../../components/ExpandableListItem' import ExpandableListItemKey from '../../components/ExpandableListItemKey' import { EnrichedPostageBatch } from '../../providers/Stamps' +import { secondsToTimeString } from '../../utils' import { getHumanReadableFileSize } from '../../utils/file' import { PostageStamp } from './PostageStamp' @@ -30,6 +31,14 @@ function StampsTable({ postageStamps }: Props): ReactElement | null { )}`} /> + + + + + } >