From 4c5df2c59fec667439b1d6d12da7d216ceaad0c2 Mon Sep 17 00:00:00 2001 From: nikolar Date: Tue, 17 Dec 2024 17:54:01 -0800 Subject: [PATCH] update review comments Signed-off-by: nikolar --- .../home/components/Grids/InfoCardGrid.tsx | 38 +++++++++---------- .../home/components/TechDocsCustomHome.tsx | 4 +- 2 files changed, 20 insertions(+), 22 deletions(-) diff --git a/plugins/techdocs/src/home/components/Grids/InfoCardGrid.tsx b/plugins/techdocs/src/home/components/Grids/InfoCardGrid.tsx index 31435debf7..cba00076b1 100644 --- a/plugins/techdocs/src/home/components/Grids/InfoCardGrid.tsx +++ b/plugins/techdocs/src/home/components/Grids/InfoCardGrid.tsx @@ -72,28 +72,26 @@ export const InfoCardGrid = (props: InfoCardGridProps) => { }); }; - if (!entities) return null; + if (!entities || !entities?.length) return null; return ( - {!entities?.length - ? null - : entities.map(entity => ( - -
{entity?.metadata?.description}
-
- - {linkContent || 'Read Docs'} - - - ))} + {entities.map(entity => ( + +
{entity?.metadata?.description}
+
+ + {linkContent || 'Read Docs'} + + + ))} ); }; diff --git a/plugins/techdocs/src/home/components/TechDocsCustomHome.tsx b/plugins/techdocs/src/home/components/TechDocsCustomHome.tsx index 3c213d827c..2dcf6aae80 100644 --- a/plugins/techdocs/src/home/components/TechDocsCustomHome.tsx +++ b/plugins/techdocs/src/home/components/TechDocsCustomHome.tsx @@ -148,9 +148,9 @@ export const CustomDocsPanel = ({ return ( <> - {config.panelProps?.showHeader !== false && ( + {!!config.panelProps?.showHeader && ( - {index === 0 && config.panelProps?.showSupport !== false && ( + {index === 0 && !!config.panelProps?.showSupport && ( Discover documentation in your ecosystem.