import { Badge, Box, Button, Container, Link, Stack, Text } from '@chakra-ui/react'; import { RoadmapType } from '../lib/roadmap'; type RelatedRoadmapsProps = { roadmaps: RoadmapType[]; }; const colorsList = [ 'gray.700', 'purple.700', 'blue.700', 'red.700', 'green.700', 'teal.700', 'yellow.700', 'cyan.700', 'pink.700' ]; const roadmapTitleMapping: Record = { "Software Design and Architecture": "Software Design", } export function RelatedRoadmaps(props: RelatedRoadmapsProps) { const { roadmaps } = props; if (!roadmaps.length) { return null; } return ( Related Roadmaps {roadmaps.map((roadmap, counter) => ( {roadmapTitleMapping[roadmap.featuredTitle] || roadmap.featuredTitle} {roadmap.featuredDescription} ))} ); }