Skip to content

Commit

Permalink
fix lesson topic json structure
Browse files Browse the repository at this point in the history
  • Loading branch information
NemoPat committed Dec 5, 2022
1 parent c3d170f commit f8dc41a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions client/components/Lessons/LessonLibrary/LessonListItem.js
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand All @@ -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)}
</h6>
);
}
Expand Down
2 changes: 1 addition & 1 deletion client/components/Lessons/LessonLibrary/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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}
Expand Down

0 comments on commit f8dc41a

Please sign in to comment.