Skip to content

Commit

Permalink
minor fix for lesson tour
Browse files Browse the repository at this point in the history
  • Loading branch information
hj940709 committed Jan 11, 2024
1 parent 0da04d9 commit 6b2ba70
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/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ const LessonList = () => {
dispatch(getLessonTopics())
dispatch(getGroups())
if (teacherView) setLibrary('group')
if (savedLibrarySelection == 'group' || savedLibrarySelection == 'public' || teacherView ) {
if (has_seen_lesson_tour && (savedLibrarySelection == 'group' || savedLibrarySelection == 'public' || teacherView) ) {
setLibrary('group')
dispatch(getLessonInstance(savedGroupSelection))
}
Expand Down
2 changes: 1 addition & 1 deletion client/components/Tour.js
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ const Tour = () => {
if (tourState.steps === lessonsTourSteps) {
switch (index) {
case 0:
const newTopics = [...lesson.topic_ids, lesson_topics[0].topic_id]
const newTopics = [...lesson.topic_ids, lesson_topics.filter(topic=>topic.target?.length>0)[0].topic_id]
dispatch(setLessonInstance({ topic_ids: newTopics}))
dispatch(setLessonStep(0))
break
Expand Down

0 comments on commit 6b2ba70

Please sign in to comment.