update review comments

Signed-off-by: nikolar <reyna.nikolayev@autodesk.com>
This commit is contained in:
nikolar
2024-12-17 17:54:01 -08:00
parent 74314c8999
commit 4c5df2c59f
2 changed files with 20 additions and 22 deletions
@@ -72,28 +72,26 @@ export const InfoCardGrid = (props: InfoCardGridProps) => {
});
};
if (!entities) return null;
if (!entities || !entities?.length) return null;
return (
<ItemCardGrid data-testid="info-card-container">
{!entities?.length
? null
: entities.map(entity => (
<InfoCard
key={entity.metadata.name}
data-testid={entity?.metadata?.title}
title={entity?.metadata?.title || entity?.metadata?.name}
>
<div>{entity?.metadata?.description}</div>
<div className={classes.linkSpacer} />
<Link
to={linkRoute(entity)}
className={classes.readMoreLink}
data-testid="read-docs-link"
>
{linkContent || 'Read Docs'}
</Link>
</InfoCard>
))}
{entities.map(entity => (
<InfoCard
key={entity.metadata.name}
data-testid={entity?.metadata?.title}
title={entity?.metadata?.title || entity?.metadata?.name}
>
<div>{entity?.metadata?.description}</div>
<div className={classes.linkSpacer} />
<Link
to={linkRoute(entity)}
className={classes.readMoreLink}
data-testid="read-docs-link"
>
{linkContent || 'Read Docs'}
</Link>
</InfoCard>
))}
</ItemCardGrid>
);
};
@@ -148,9 +148,9 @@ export const CustomDocsPanel = ({
return (
<>
{config.panelProps?.showHeader !== false && (
{!!config.panelProps?.showHeader && (
<ContentHeader title={config.title} description={config.description}>
{index === 0 && config.panelProps?.showSupport !== false && (
{index === 0 && !!config.panelProps?.showSupport && (
<SupportButton>
Discover documentation in your ecosystem.
</SupportButton>