From f500d49275fdebdaf7d4acc2ca7e5db00e0608ba Mon Sep 17 00:00:00 2001 From: Kamran Ahmed Date: Fri, 3 Dec 2021 20:44:49 +0100 Subject: [PATCH] Refactor roadmap page logic --- pages/[roadmap]/index.tsx | 24 +++--------------------- pages/roadmaps.tsx | 4 ++-- 2 files changed, 5 insertions(+), 23 deletions(-) diff --git a/pages/[roadmap]/index.tsx b/pages/[roadmap]/index.tsx index 02d45c03f..6c9a05266 100644 --- a/pages/[roadmap]/index.tsx +++ b/pages/[roadmap]/index.tsx @@ -1,30 +1,12 @@ -import { - Box, - Button, - Text, - Container, - Link, - Stack, - Badge, -} from '@chakra-ui/react'; -import { - ArrowBackIcon, - AtSignIcon, - DownloadIcon, - ViewIcon, -} from '@chakra-ui/icons'; +import React from 'react'; +import { Box, Container, Image } 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 { PageHeader } from '../../components/page-header'; import { getAllRoadmaps, getRoadmapById, RoadmapType } from '../../lib/roadmap'; import MdRenderer from '../../components/md-renderer'; import Helmet from '../../components/helmet'; -import siteConfig from '../../content/site.json'; -import React from 'react'; -import { event } from '../../lib/gtag'; -import { NewAlertBanner } from '../../components/roadmap/new-alert-banner'; import { RoadmapPageHeader } from '../../components/roadmap/roadmap-page-header'; type RoadmapProps = { @@ -40,7 +22,7 @@ function ImageRoadmap(props: RoadmapProps) { return ( - Frontend Roadmap + {roadmap.title} ); diff --git a/pages/roadmaps.tsx b/pages/roadmaps.tsx index 61fb6a30d..6ceb28ebd 100644 --- a/pages/roadmaps.tsx +++ b/pages/roadmaps.tsx @@ -7,7 +7,7 @@ import { PageHeader } from '../components/page-header'; import { RoadmapGridItem } from '../components/roadmap/roadmap-grid-item'; import { getAllRoadmaps, RoadmapType } from '../lib/roadmap'; import Helmet from '../components/helmet'; -import { NewBanner } from './[roadmap]'; +import { NewAlertBanner } from '../components/roadmap/new-alert-banner'; type RoadmapsProps = { roadmaps: RoadmapType[]; @@ -25,7 +25,7 @@ export default function Roadmaps(props: RoadmapsProps) { /> } + beforeTitle={} title={'Developer Roadmaps'} subtitle={'Step by step guides and paths to learn different tools or technologies'} />