Skip to content

Commit

Permalink
fix: In chart gallery thumbnail is rendered in case of no example in a…
Browse files Browse the repository at this point in the history
  • Loading branch information
sivasathyaseeelan authored Jan 8, 2024
1 parent 3a6dc1d commit 6d58566
Showing 1 changed file with 10 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -849,10 +849,18 @@ export default function VizTypeGallery(props: VizTypeGalleryProps) {
grid-area: examples-header;
`}
>
{!!selectedVizMetadata?.exampleGallery?.length && t('Examples')}
{t('Examples')}
</SectionTitle>
<Examples>
{(selectedVizMetadata?.exampleGallery || []).map(example => (
{(selectedVizMetadata?.exampleGallery?.length
? selectedVizMetadata.exampleGallery
: [
{
url: selectedVizMetadata?.thumbnail,
caption: selectedVizMetadata?.name,
},
]
).map(example => (
<img
key={example.url}
src={example.url}
Expand Down

0 comments on commit 6d58566

Please sign in to comment.