Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
const renderedCardContainers = Object.keys(tags).map((topic) => {
const cardsForTopic = examples
.filter(example => example.tags.indexOf(topic) > -1)
.map((example, index) => {
const filename = example.pathname.split('/')[3];
return (
}
Object.keys(data).map((topic) => {
const subNavItems = examples
.filter(item => item.tags[0] === topic)
.map(item => ({
text: item.title,
description: item.description,
url: item.path,
active: this.props.location.pathname === item.path
}));
return {
title: data[topic],
url: `/mapbox-gl-js/examples/#${topic}`,
items: subNavItems
};
}).filter(topic => topic.items.length > 0)
);