import React from 'react'; import { Box, Button, Container, Flex, Heading, Image, Input, Text } from '@chakra-ui/react'; import { GlobalHeader } from '../../components/global-header'; import { OpensourceBanner } from '../../components/opensource-banner'; import { Footer } from '../../components/footer'; import { filterRoadmapsByIds, 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'; import { FreeSignUp, SIGNUP_EMAIL_INPUT_NAME, SIGNUP_FORM_ACTION } from '../signup'; import { BellIcon, EmailIcon } from '@chakra-ui/icons'; import { RelatedRoadmaps } from '../../components/related-roadmaps'; 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 ( ); } function UpcomingRoadmap(props: RoadmapProps) { const { roadmap } = props; if (!roadmap.isUpcoming) { return null; } return ( Upcoming Roadmap Please check back later or subscribe below.
); } type RoadmapPageProps = RoadmapProps & { relatedRoadmaps: RoadmapType[] }; export default function Roadmap(props: RoadmapPageProps) { const { roadmap, relatedRoadmaps } = props; return (