diff --git a/client/src/components/Map/components/Block.js b/client/src/components/Map/components/Block.js
index bb5db5446b..fbb4f71aa8 100644
--- a/client/src/components/Map/components/Block.js
+++ b/client/src/components/Map/components/Block.js
@@ -9,6 +9,7 @@ import ga from '../../../analytics';
import { makeExpandedBlockSelector, toggleBlock } from '../redux';
import { userSelector } from '../../../redux';
import Caret from '../../icons/Caret';
+import { blockNameify } from '../../../../utils/blockNameify';
/* eslint-disable max-len */
import GreenPass from '../../../templates/Challenges/components/icons/GreenPass';
import GreenNotCompleted from '../../../templates/Challenges/components/icons/GreenNotCompleted';
@@ -108,8 +109,7 @@ export class Block extends Component {
}
render() {
- const { completedChallenges, challenges, isExpanded, intro } = this.props;
- const { blockName } = challenges[0].fields;
+ const { blockDashedName, completedChallenges, challenges, isExpanded, intro } = this.props;
const challengesWithCompleted = challenges.map(challenge => {
const { id } = challenge;
const isCompleted = completedChallenges.some(
@@ -121,7 +121,7 @@ export class Block extends Component {
-
{blockName}
+ {blockNameify(blockDashedName)}
{isExpanded
diff --git a/client/utils/blockNameify.js b/client/utils/blockNameify.js
index 07774a36db..35de349d43 100644
--- a/client/utils/blockNameify.js
+++ b/client/utils/blockNameify.js
@@ -10,7 +10,9 @@ const preFormattedBlockNames = {
jquery: 'jQuery',
'json-apis-and-ajax': 'JSON APIs and Ajax',
'mongodb-and-mongoose': 'MongoDB and Mongoose',
- 'the-dom': 'The DOM'
+ 'the-dom': 'The DOM',
+ 'apis-and-microservices': 'APIs and Microservices',
+ 'apis-and-microservices-projects': 'APIs and Microservices Projects'
};
const noFormatting = ['and', 'for', 'of', 'the', 'up', 'with'];
diff --git a/client/utils/buildChallenges.js b/client/utils/buildChallenges.js
index db62929153..259621b5df 100644
--- a/client/utils/buildChallenges.js
+++ b/client/utils/buildChallenges.js
@@ -7,6 +7,7 @@ const {
} = require('../../curriculum/getChallenges');
const utils = require('./');
const { locale } = require('../config/env.json');
+const { blockNameify } = require('./blockNameify');
const dasherize = utils.dasherize;
const nameify = utils.nameify;
@@ -56,9 +57,6 @@ function prepareChallenge(challenge) {
);
}
challenge.block = dasherize(challenge.block);
- challenge.superBlock = challenge.superBlock
- .split('-')
- .map(word => _.capitalize(word))
- .join(' ');
+ challenge.superBlock = blockNameify(challenge.superBlock);
return challenge;
}