import React from 'react'; import { Box, Container, Image, Text } from '@chakra-ui/react'; import { GlobalHeader } from '../../components/global-header'; import { OpensourceBanner } from '../../components/opensource-banner'; import { UpdatesBanner } from '../../components/updates-banner'; import { Footer } from '../../components/footer'; import { getAllRoadmaps, getRoadmapById, isInteractiveRoadmap, RoadmapType } from '../../lib/roadmap'; import MdRenderer from '../../components/md-renderer'; import Helmet from '../../components/helmet'; import { RoadmapPageHeader } from '../../components/roadmap/roadmap-page-header'; import { InteractiveRoadmapRenderer } from './interactive'; type RoadmapProps = { roadmap: RoadmapType; }; function ImageRoadmap(props: RoadmapProps) { const { roadmap } = props; if (isInteractiveRoadmap(roadmap.id)) { return ; } if (!roadmap.imageUrl) { return null; } return ( {roadmap.title} ); } function TextualRoadmap(props: RoadmapProps) { const { roadmap } = props; if (!roadmap.landingPath) { return null; } // Remove trailing slashes const normalizedPath = roadmap.landingPath.replace(/^\//, ''); const LandingContent = require(`../../content/${normalizedPath}`).default; return ( ); } export default function Roadmap(props: RoadmapProps) { const { roadmap } = props; return (