diff --git a/client/components/Lessons/LessonLibrary/LessonListItem.js b/client/components/Lessons/LessonLibrary/LessonListItem.js index d20f8455e..41a61af79 100644 --- a/client/components/Lessons/LessonLibrary/LessonListItem.js +++ b/client/components/Lessons/LessonLibrary/LessonListItem.js @@ -15,7 +15,7 @@ const LessonTitle = ({ lesson }) => { const learningLanguage = useSelector(learningLanguageSelector) - const topics = lesson.topics ? lesson.topics.split(";") : [] + const topics = lesson.topics ? lesson.topics : [] let topic_rows = [] for (let i = 0; i < topics.length; i++) { topic_rows.push( @@ -26,7 +26,7 @@ const LessonTitle = ({ ...getTextStyle(learningLanguage) }} > - {topics[i].charAt(0).toUpperCase() + topics[i].slice(1)} + {topics[i].topic.charAt(0).toUpperCase() + topics[i].topic.slice(1)} ); } diff --git a/client/components/Lessons/LessonLibrary/index.js b/client/components/Lessons/LessonLibrary/index.js index 7af4c3c85..6a4c74adc 100644 --- a/client/components/Lessons/LessonLibrary/index.js +++ b/client/components/Lessons/LessonLibrary/index.js @@ -183,7 +183,7 @@ const LessonList = () => { rowCount={libraryFilteredLessons.length} rowHeight = {(index) => { const lesson = libraryFilteredLessons[index.index] - const topics = lesson ? lesson.topics.split(";") : [] + const topics = lesson ? lesson.topics : [] return 130 + topics.length * 25; }} // rowHeight= {300}