@@ -22,7 +22,7 @@ import Icon, {
2222 TagIcon ,
2323 VisibleIcon ,
2424} from '../../icons' ;
25- import { getLocalizedDescription } from '../../../helpers/localizedData.js' ;
25+ import { getLocalizedDescription , replaceLinkKeysWithUrls } from '../../../helpers/localizedData.js' ;
2626import { LocalizedExerciseName } from '../../helpers/LocalizedNames' ;
2727import EnvironmentsList from '../../helpers/EnvironmentsList' ;
2828import Version from '../../widgets/Version/Version.js' ;
@@ -33,13 +33,13 @@ const ExerciseDetail = ({
3333 authorId,
3434 adminsIds = [ ] ,
3535 groupsIds = [ ] ,
36- description = '' ,
3736 difficulty,
3837 createdAt,
3938 updatedAt,
4039 version,
4140 forkedFrom = null ,
4241 localizedTexts,
42+ localizedTextsLinks,
4343 runtimeEnvironments,
4444 tags,
4545 isPublic,
@@ -105,7 +105,9 @@ const ExerciseDetail = ({
105105 </ span >
106106 </ th >
107107 < td >
108- < Markdown source = { getLocalizedDescription ( { description, localizedTexts } , locale ) } />
108+ < Markdown
109+ source = { replaceLinkKeysWithUrls ( getLocalizedDescription ( { localizedTexts } , locale ) , localizedTextsLinks ) }
110+ />
109111 </ td >
110112 </ tr >
111113
@@ -276,17 +278,16 @@ const ExerciseDetail = ({
276278
277279ExerciseDetail . propTypes = {
278280 id : PropTypes . string . isRequired ,
279- name : PropTypes . string . isRequired ,
280281 authorId : PropTypes . string . isRequired ,
281282 adminsIds : PropTypes . array ,
282283 groupsIds : PropTypes . array ,
283284 difficulty : PropTypes . string . isRequired ,
284- description : PropTypes . string ,
285285 createdAt : PropTypes . number . isRequired ,
286286 updatedAt : PropTypes . number . isRequired ,
287287 version : PropTypes . number . isRequired ,
288288 forkedFrom : PropTypes . object ,
289289 localizedTexts : PropTypes . array . isRequired ,
290+ localizedTextsLinks : PropTypes . object ,
290291 runtimeEnvironments : PropTypes . array . isRequired ,
291292 tags : PropTypes . array . isRequired ,
292293 isPublic : PropTypes . bool . isRequired ,
0 commit comments