refactor: use dashedName over dasherize(title)

This commit is contained in:
Oliver Eyton-Williams
2020-10-01 15:07:03 +02:00
committed by Mrugesh Mohapatra
parent d90f84e968
commit ed2840cb1c
3 changed files with 6 additions and 7 deletions

View File

@@ -99,11 +99,7 @@ export class Block extends Component {
return (
<li
className={'map-challenge-title' + completedClass}
id={
challenge.title
? dasherize(challenge.title)
: dasherize(challenge.frontmatter.title)
}
id={challenge.dashedName || dasherize(challenge.frontmatter.title)}
key={'map-challenge' + challenge.fields.slug}
>
<span className='badge map-badge'>