diff --git a/.changeset/chilly-fireants-roll.md b/.changeset/chilly-fireants-roll.md new file mode 100644 index 0000000000..93c05fecb7 --- /dev/null +++ b/.changeset/chilly-fireants-roll.md @@ -0,0 +1,5 @@ +--- +'@backstage/plugin-home': patch +--- + +Use relative time when displaying visits from the same day diff --git a/plugins/home/src/components/VisitList/ItemDetail.tsx b/plugins/home/src/components/VisitList/ItemDetail.tsx index fed8c5549c..832803800c 100644 --- a/plugins/home/src/components/VisitList/ItemDetail.tsx +++ b/plugins/home/src/components/VisitList/ItemDetail.tsx @@ -35,9 +35,7 @@ const ItemDetailTimeAgo = ({ visit }: { visit: Visit }) => { color="textSecondary" dateTime={visitDate.toISO() ?? undefined} > - {visitDate >= DateTime.now().startOf('day') - ? visitDate.toFormat('HH:mm') - : visitDate.toRelative()} + {visitDate.toRelative()} ); };