update review comments
Signed-off-by: nikolar <reyna.nikolayev@autodesk.com>
This commit is contained in:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user