Skip to content

Commit 0b2fdce

Browse files
fix: update super block list (#6)
1 parent eec6860 commit 0b2fdce

5 files changed

Lines changed: 115 additions & 131 deletions

File tree

Lines changed: 90 additions & 116 deletions
Original file line numberDiff line numberDiff line change
@@ -1,118 +1,92 @@
1-
export const superBlockList = [
2-
{
3-
name: 'Legacy Responsive Web Design',
4-
path: 'responsive-web-design'
5-
},
6-
{
7-
name: 'Legacy JavaScript Algorithms and Data Structures',
8-
path: 'javascript-algorithms-and-data-structures'
9-
},
10-
{
11-
name: 'Front End Development Libraries',
12-
path: 'front-end-development-libraries'
13-
},
14-
{
15-
name: 'Data Visualization',
16-
path: 'data-visualization'
17-
},
18-
{
19-
name: 'Back End Development and APIs',
20-
path: 'back-end-development-and-apis'
21-
},
22-
{
23-
name: 'Quality Assurance',
24-
path: 'quality-assurance'
25-
},
26-
{
27-
name: 'Scientific Computing with Python',
28-
path: 'scientific-computing-with-python'
29-
},
30-
{
31-
name: 'Data Analysis with Python',
32-
path: 'data-analysis-with-python'
33-
},
34-
{
35-
name: 'Information Security',
36-
path: 'information-security'
37-
},
38-
{
39-
name: 'Coding Interview Prep',
40-
path: 'coding-interview-prep'
41-
},
42-
{
43-
name: 'Machine Learning with Python',
44-
path: 'machine-learning-with-python'
45-
},
46-
{
47-
name: 'Relational Databases',
48-
path: 'relational-databases'
49-
},
50-
{
51-
name: 'Responsive Web Design',
52-
path: 'responsive-web-design-22'
53-
},
54-
{
55-
name: 'JavaScript Algorithms and Data Structures',
56-
path: 'javascript-algorithms-and-data-structures-22'
57-
},
58-
{
59-
name: 'The Odin Project',
60-
path: 'the-odin-project'
61-
},
62-
{
63-
name: 'College Algebra with Python',
64-
path: 'college-algebra-with-python'
65-
},
66-
{
67-
name: 'Project Euler',
68-
path: 'project-euler'
69-
},
70-
{
71-
name: '(New) Foundational C# with Microsoft',
72-
path: 'foundational-c-sharp-with-microsoft'
73-
},
74-
{
75-
name: 'A2 English for Developers',
76-
path: 'a2-english-for-developers'
77-
},
78-
{
79-
name: 'Rosetta Code',
80-
path: 'rosetta-code'
81-
},
82-
{
83-
name: 'Python For Everybody',
84-
path: 'python-for-everybody'
85-
},
86-
{
87-
name: 'B1 English for Developers (Beta)',
88-
path: 'b1-english-for-developers'
89-
},
90-
{
91-
name: 'Certified Full Stack Developer',
92-
path: 'full-stack-developer'
93-
},
94-
{
95-
name: 'A1 Professional Spanish (Beta)',
96-
path: 'a1-professional-spanish'
97-
},
98-
{
99-
name: 'A2 Professional Spanish (Beta)',
100-
path: 'a2-professional-spanish'
101-
},
102-
{
103-
name: 'A2 Professional Chinese (Beta)',
104-
path: 'a2-professional-chinese'
105-
},
106-
{
107-
name: 'Basic HTML',
108-
path: 'basic-html'
109-
},
110-
{
111-
name: 'Semantic HTML',
112-
path: 'semantic-html'
113-
},
114-
{
115-
name: 'A1 Professional Chinese (Beta)',
116-
path: 'a1-professional-chinese'
1+
export const superBlockStages = [
2+
{
3+
stageName: 'Core Curriculum',
4+
superBlocks: [
5+
{
6+
name: 'Responsive Web Design V9',
7+
path: 'responsive-web-design-v9'
8+
},
9+
{
10+
name: 'JavaScript V9',
11+
path: 'javascript-v9'
12+
},
13+
{
14+
name: 'Front End Development Libraries V9',
15+
path: 'front-end-development-libraries-v9'
16+
},
17+
{
18+
name: 'Python V9',
19+
path: 'python-v9'
20+
},
21+
{
22+
name: 'Relational Databases V9',
23+
path: 'relational-databases-v9'
24+
},
25+
{
26+
name: 'Back End Development and APIs V9',
27+
path: 'back-end-development-and-apis-v9'
28+
}
29+
]
30+
},
31+
{
32+
stageName: 'English for Developers',
33+
superBlocks: [
34+
{
35+
name: 'A2 English for Developers',
36+
path: 'a2-english-for-developers'
37+
},
38+
{
39+
name: 'B1 English for Developers',
40+
path: 'b1-english-for-developers'
41+
}
42+
]
43+
},
44+
{
45+
stageName: 'Professional Spanish',
46+
superBlocks: [
47+
{
48+
name: 'A1 Professional Spanish',
49+
path: 'a1-professional-spanish'
50+
}
51+
]
52+
},
53+
{
54+
stageName: 'Professional Chinese',
55+
superBlocks: [
56+
{
57+
name: 'A1 Professional Chinese',
58+
path: 'a1-professional-chinese'
59+
}
60+
]
61+
},
62+
{
63+
stageName: 'Professional Certifications',
64+
superBlocks: [
65+
{
66+
name: 'Foundational C# with Microsoft',
67+
path: 'foundational-c-sharp-with-microsoft'
68+
}
69+
]
70+
},
71+
{
72+
stageName: 'Extra Practice',
73+
superBlocks: [
74+
{
75+
name: 'The Odin Project',
76+
path: 'the-odin-project'
77+
},
78+
{
79+
name: 'Coding Interview Prep',
80+
path: 'coding-interview-prep'
81+
},
82+
{
83+
name: 'Project Euler',
84+
path: 'project-euler'
85+
},
86+
{
87+
name: 'Rosetta Code',
88+
path: 'rosetta-code'
89+
}
90+
]
11791
}
11892
];

apps/api/routes/index-route.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { Request, Response } from 'express';
2-
import { superBlockList } from '../configs/super-block-list';
2+
import { superBlockStages } from '../configs/super-block-list';
33

44
export const indexRoute = (req: Request, res: Response): void => {
5-
res.json(superBlockList);
5+
res.json(superBlockStages);
66
};

apps/api/utils/get-blocks.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ type BlockLocation = {
2424

2525
// This will need manual updates as new chapter-based super blocks are added
2626
const chapterBasedSuperBlocks = [
27-
'full-stack-developer',
2827
'full-stack-open',
2928
'a1-professional-spanish',
3029
'responsive-web-design-v9',
@@ -39,6 +38,7 @@ const chapterBasedSuperBlocks = [
3938

4039
export const getBlocks = async (sup: string): Promise<BlockLocation> => {
4140
const superBlockDataPath = join(SUPERBLOCK_META_DIR, sup + '.json');
41+
4242
const superBlockMetaFile = await readFile(superBlockDataPath, {
4343
encoding: 'utf8'
4444
});

apps/client/interfaces/super-block.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,8 @@ export interface SuperBlock {
22
name: string;
33
path: string;
44
}
5+
6+
export interface SuperBlockStage {
7+
stageName: string;
8+
superBlocks: SuperBlock[];
9+
}

apps/client/src/components/landing/landing.tsx

Lines changed: 17 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
import React, { useEffect, useState } from 'react';
22
import { Link } from 'react-router-dom';
3-
import { SuperBlock } from '../../../interfaces/super-block';
3+
import { type SuperBlockStage } from '../../../interfaces/super-block';
44
import { API_LOCATION } from '../../utils/handle-request';
55

66
const Landing = () => {
77
const [error, setError] = useState<Error | null>(null);
88
const [loading, setLoading] = useState(false);
9-
const [items, setItems] = useState([] as SuperBlock[]);
9+
const [stages, setStages] = useState([] as SuperBlockStage[]);
1010

1111
useEffect(() => {
1212
fetchData();
@@ -15,11 +15,11 @@ const Landing = () => {
1515
const fetchData = () => {
1616
setLoading(true);
1717
fetch(API_LOCATION)
18-
.then(res => res.json() as Promise<SuperBlock[]>)
18+
.then(res => res.json() as Promise<SuperBlockStage[]>)
1919
.then(
20-
superblocks => {
20+
superBlockStages => {
2121
setLoading(false);
22-
setItems(superblocks);
22+
setStages(superBlockStages);
2323
},
2424
(error: Error) => {
2525
setLoading(false);
@@ -37,13 +37,18 @@ const Landing = () => {
3737
return (
3838
<div>
3939
<h1>Superblocks</h1>
40-
<ul>
41-
{items.map(superblock => (
42-
<li key={superblock.name}>
43-
<Link to={`/${superblock.path}`}>{superblock.name}</Link>
44-
</li>
45-
))}
46-
</ul>
40+
{stages.map(stage => (
41+
<div key={stage.stageName}>
42+
<h2>{stage.stageName}</h2>
43+
<ul>
44+
{stage.superBlocks.map(superblock => (
45+
<li key={superblock.name}>
46+
<Link to={`/${superblock.path}`}>{superblock.name}</Link>
47+
</li>
48+
))}
49+
</ul>
50+
</div>
51+
))}
4752
</div>
4853
);
4954
};

0 commit comments

Comments
 (0)