Refactor roadmap id

pull/1331/head
Kamran Ahmed 3 years ago
parent ad427eceee
commit 9b97fce431
  1. 21
      content/roadmaps.json
  2. 1
      lib/roadmap.ts
  3. 2
      pages/index.tsx

@ -39,8 +39,7 @@
"featured": true, "featured": true,
"imagePath": "/roadmaps/frontend.png", "imagePath": "/roadmaps/frontend.png",
"resourcesPath": "/roadmaps/1-frontend/resources.md", "resourcesPath": "/roadmaps/1-frontend/resources.md",
"id": "frontend", "id": "frontend"
"url": "/frontend"
}, },
{ {
"seo": { "seo": {
@ -82,8 +81,7 @@
"name": "Kamran Ahmed", "name": "Kamran Ahmed",
"url": "https://twitter.com/kamranahmedse" "url": "https://twitter.com/kamranahmedse"
}, },
"id": "backend", "id": "backend"
"url": "/backend"
}, },
{ {
"seo": { "seo": {
@ -124,8 +122,7 @@
"name": "Kamran Ahmed", "name": "Kamran Ahmed",
"url": "https://twitter.com/kamranahmedse" "url": "https://twitter.com/kamranahmedse"
}, },
"id": "devops", "id": "devops"
"url": "/devops"
}, },
{ {
"seo": { "seo": {
@ -164,8 +161,7 @@
"name": "Kamran Ahmed", "name": "Kamran Ahmed",
"url": "https://twitter.com/kamranahmedse" "url": "https://twitter.com/kamranahmedse"
}, },
"id": "react", "id": "react"
"url": "/react"
}, },
{ {
"seo": { "seo": {
@ -208,8 +204,7 @@
"featured": true, "featured": true,
"detailed": false, "detailed": false,
"versions": [], "versions": [],
"id": "postgresql-dba", "id": "postgresql-dba"
"url": "/postgresql-dba"
}, },
{ {
"seo": { "seo": {
@ -248,8 +243,7 @@
"name": "Kamran Ahmed", "name": "Kamran Ahmed",
"url": "https://twitter.com/kamranahmedse" "url": "https://twitter.com/kamranahmedse"
}, },
"id": "android", "id": "android"
"url": "/android"
}, },
{ {
"seo": { "seo": {
@ -281,7 +275,6 @@
"name": "Anas Fitiani", "name": "Anas Fitiani",
"url": "https://github.com/anas-qa" "url": "https://github.com/anas-qa"
}, },
"id": "qa", "id": "qa"
"url": "/qa"
} }
] ]

@ -21,7 +21,6 @@ export type RoadmapType = {
isCommunity: boolean; isCommunity: boolean;
isUpcoming: boolean; isUpcoming: boolean;
id: string; id: string;
url: string;
}; };
export function getRoadmapById(id: string): RoadmapType | undefined { export function getRoadmapById(id: string): RoadmapType | undefined {

@ -44,7 +44,7 @@ export default function Home(props: HomeProps) {
<SimpleGrid columns={[1, 2, 3]} spacing={['10px', '10px', '15px']}> <SimpleGrid columns={[1, 2, 3]} spacing={['10px', '10px', '15px']}>
{roadmaps.map((roadmap: RoadmapType, counter: number) => ( {roadmaps.map((roadmap: RoadmapType, counter: number) => (
<HomeRoadmapItem <HomeRoadmapItem
url={roadmap.url} url={`/${roadmap.id}`}
key={roadmap.id} key={roadmap.id}
colorIndex={counter} colorIndex={counter}
title={roadmap.featuredTitle} title={roadmap.featuredTitle}

Loading…
Cancel
Save