import { Box, Breadcrumb, BreadcrumbItem, BreadcrumbLink, Container } from '@chakra-ui/react'; import { GlobalHeader } from '../../components/global-header'; import { OpensourceBanner } from '../../components/opensource-banner'; import { Footer } from '../../components/footer'; import { getAllRoadmaps, getRoadmapById, RoadmapType } from '../../lib/roadmap'; import MdRenderer from '../../components/md-renderer'; import Helmet from '../../components/helmet'; import React from 'react'; import { ChevronRightIcon } from '@chakra-ui/icons'; import siteConfig from '../../content/site.json'; import { EditContentPageLink } from '../../components/roadmap/edit-content-page-link'; type RoadmapProps = { roadmap: RoadmapType; group: string; isOutlet?: boolean; }; // @todo error handling function TextualContent(props: RoadmapProps) { const { roadmap, group } = props; if (!roadmap.contentPathsFilePath) { return null; } // Remove trailing slashes const contentsPathsFilePath = roadmap.contentPathsFilePath.replace(/^\//, ''); const contentPathMapping = require(`../../content/${contentsPathsFilePath}`); const contentFilePath = contentPathMapping[group] || ''; const normalizedContentFilePath = contentFilePath.replace(/^\//, ''); const GroupContent = require(`../../content/${normalizedContentFilePath}`).default; return ( ); } function RoadmapBreadcrumb(props: RoadmapProps) { const { roadmap, group } = props; const groupParts = group.split(':'); return ( } > {roadmap.featuredTitle} {groupParts.map((groupPart: string, counter: number) => ( {groupPart.split('-').join(' ')} ))} ); } export default function RoadmapGroup(props: RoadmapProps) { const { roadmap, group, isOutlet = false } = props; if (isOutlet) { return ; } return (