From 3081bfad595ab8c261eee51ade2ed47a07fae866 Mon Sep 17 00:00:00 2001 From: Emanuele Coricciati Date: Wed, 22 Jan 2025 13:40:03 +0100 Subject: [PATCH] fix(courses): add course to teaching screen --- src/features/teaching/screens/TeachingScreen.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/features/teaching/screens/TeachingScreen.tsx b/src/features/teaching/screens/TeachingScreen.tsx index 8fc3f17c..e0456aa5 100644 --- a/src/features/teaching/screens/TeachingScreen.tsx +++ b/src/features/teaching/screens/TeachingScreen.tsx @@ -41,6 +41,7 @@ import { useGetSurveyCategories } from '../../../core/queries/surveysHooks'; import { GlobalStyles } from '../../../core/styles/GlobalStyles'; import { formatFinalGrade } from '../../../utils/grades'; import { CourseListItem } from '../../courses/components/CourseListItem'; +import { isCourseDetailed } from '../../courses/utils/courses'; import { ExamListItem } from '../components/ExamListItem'; import { ProgressChart } from '../components/ProgressChart'; import { SurveyTypesSection } from '../components/SurveyTypesSection'; @@ -66,7 +67,7 @@ export const TeachingScreen = ({ navigation }: Props) => { return coursesQuery.data.filter( c => - c.id && + isCourseDetailed(c) && c.uniqueShortcode && !coursePreferences[c.uniqueShortcode]?.isHidden, );