import { Box, Button, Container, Link, Stack } from '@chakra-ui/react'; import { DownloadIcon, EmailIcon } from '@chakra-ui/icons'; import { GlobalHeader } from '../../components/global-header'; import { OpensourceBanner } from '../../components/opensource-banner'; import { UpdatesBanner } from '../../components/updates-banner'; import { Footer } from '../../components/footer'; import { PageHeader } from '../../components/page-header'; import { getAllRoadmaps, getRoadmapById, RoadmapType } from '../../lib/roadmap'; import MdRenderer from '../../components/md-renderer'; type RoadmapProps = { roadmap: RoadmapType; }; function ImageRoadmap(props: RoadmapProps) { const { roadmap } = props; if (!roadmap.imagePath) { return null; } return ( Frontend Roadmap ); } function TextualRoadmap(props: RoadmapProps) { const { roadmap } = props; if (!roadmap.contentPath) { return null; } // Remove trailing slashes const normalizedPath = roadmap.contentPath.replace(/^\//, ''); const RoadmapContent = require(`../../content/${normalizedPath}`).default; return ( ); } export default function Roadmap(props: RoadmapProps) { const { roadmap } = props; return ( {roadmap.pdfUrl && ( )}