Skip to content

Commit

Permalink
update lesson correct color
Browse files Browse the repository at this point in the history
  • Loading branch information
ducvugithub committed Dec 4, 2023
1 parent a95d38f commit 818edc4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion client/components/Lessons/LessonLibrary/LessonListItem.js
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ const LessonTitle = ({ lesson, selected, disabled, toggleTopic, includeLesson, e
const LessonListItem = ({ lesson, selected, toggleTopic, includeLesson, excludeLesson, disabled }) => {
const correct_perc = get_lesson_performance(lesson.correct, lesson.total)
let backgroundColor = '#ffffff'
if (correct_perc >= 0.75) backgroundColor = '#32cd3233'
if (correct_perc >= 0.75) backgroundColor = '#E2FFE1'
return (
<Card
fluid
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 @@ -576,7 +576,7 @@ const LessonList = () => {

function rowRenderer({ key, index, style }) {
const lesson = lessons && lessons[index]
const lowestScore = calculateLowestScore(topics.filter(topic => topic.lessons && topic.lessons.includes(lesson.ID)))
const lowestScore = calculateLowestScore(topics.filter(topic => lesson.topics && lesson.topics?.includes(topic.topic_id)))
lesson.correct = lowestScore.correct
lesson.total = lowestScore.total
return (
Expand Down

0 comments on commit 818edc4

Please sign in to comment.