From 3d16d784c2624168b95f72c7dabd742977d9cc11 Mon Sep 17 00:00:00 2001 From: Abi Raja Date: Wed, 6 Dec 2023 15:37:59 -0500 Subject: [PATCH] improve look of history display --- frontend/src/components/HistoryDisplay.tsx | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/frontend/src/components/HistoryDisplay.tsx b/frontend/src/components/HistoryDisplay.tsx index 2d76783..0306cf1 100644 --- a/frontend/src/components/HistoryDisplay.tsx +++ b/frontend/src/components/HistoryDisplay.tsx @@ -25,15 +25,16 @@ function displayHistoryItemType(itemType: HistoryItemType) { } export default function HistoryDisplay({ history, revertToVersion }: Props) { - return ( -
-

History

+ return history.length === 0 ? null : ( +
+

History

-
    +
      {history.map((item, index) => (
    • revertToVersion(index)} >

      {displayHistoryItemType(item.type)}