From 1a18ce11ce4839a5f7c4368597f42868fd4bff8f Mon Sep 17 00:00:00 2001 From: Tom Hacohen Date: Mon, 7 Sep 2020 17:38:43 +0300 Subject: [PATCH] Change history: show a placeholder when change history is empty. --- src/components/GenericChangeHistory.tsx | 28 +++++++++++++++---------- 1 file changed, 17 insertions(+), 11 deletions(-) diff --git a/src/components/GenericChangeHistory.tsx b/src/components/GenericChangeHistory.tsx index a839997..4d06ba6 100644 --- a/src/components/GenericChangeHistory.tsx +++ b/src/components/GenericChangeHistory.tsx @@ -96,17 +96,23 @@ export default function GenericChangeHistory(props: PropsType) { return ( - - {({ height, width }) => ( - - )} - + {(entriesList.length > 0) ? ( + + {({ height, width }) => ( + + )} + + ) : ( + + )} ); }