diff --git a/components/home/featured-roadmaps-list.tsx b/components/home/featured-roadmaps-list.tsx new file mode 100644 index 000000000..6d7c69d24 --- /dev/null +++ b/components/home/featured-roadmaps-list.tsx @@ -0,0 +1,32 @@ +import { RoadmapType } from '../../lib/roadmap'; +import { Box, SimpleGrid, Tag } from '@chakra-ui/react'; +import { HomeRoadmapItem } from '../roadmap/home-roadmap-item'; + +type FeaturedRoadmapsListProps = { + roadmaps: RoadmapType[]; + title: string; + +}; + +export function FeaturedRoadmapsList(props: FeaturedRoadmapsListProps) { + const { roadmaps, title } = props; + + return ( + <> + {title} + + {roadmaps.map((roadmap: RoadmapType, counter: number) => ( + + ))} + + + ); +} diff --git a/pages/index.tsx b/pages/index.tsx index 8212ed0f1..8a7443a2a 100644 --- a/pages/index.tsx +++ b/pages/index.tsx @@ -12,6 +12,7 @@ import { getAllGuides, GuideType } from '../lib/guide'; import { getAllVideos, VideoType } from '../lib/video'; import Helmet from '../components/helmet'; import { PageWrapper } from '../components/page-wrapper'; +import { FeaturedRoadmapsList } from '../components/home/featured-roadmaps-list'; type HomeProps = { roadmaps: RoadmapType[]; @@ -46,36 +47,15 @@ export default function Home(props: HomeProps) { - Role Based Roadmaps - - {roadmaps.filter(roadmap => roadmap.type === 'role').map((roadmap: RoadmapType, counter: number) => ( - - ))} - + roadmap.type === 'role')} + title={'Role Based Roadmaps' } + /> - Tool Based Skill Trees - - - {roadmaps.filter(roadmap => roadmap.type === 'tool').map((roadmap: RoadmapType, counter: number) => ( - - ))} - + roadmap.type === 'tool')} + title={'Tool Based Skill Trees' } + />