diff --git a/frontend/src/features/courses/components/Overview.tsx b/frontend/src/features/courses/components/Overview.tsx index 4c28f24..b413467 100644 --- a/frontend/src/features/courses/components/Overview.tsx +++ b/frontend/src/features/courses/components/Overview.tsx @@ -13,7 +13,6 @@ import { useProgressSnapshot } from '../../dashboard/hooks/useProgressSnapshot' import { useAuth } from '../../auth' import { useFavorites } from '../../favorites' import { useOnboarding } from '../../onboarding' -import { shouldShowRatingChip } from '../../reviews' import { TOUR_SAMPLE_COURSES, getCatalogTourSampleVariant, @@ -221,7 +220,6 @@ export function CoursesOverview() { const [selectedTerms, setSelectedTerms] = useState>([]) const [selectedCourseTypes, setSelectedCourseTypes] = useState([]) const [showOnlyOpenMandatory, setShowOnlyOpenMandatory] = useState(false) - const [showOnlyReviewed, setShowOnlyReviewed] = useState(false) const [showUnconfirmedOfferings, setShowUnconfirmedOfferings] = useState(false) const [areFiltersOpen, setAreFiltersOpen] = useState(false) const [sortOption, setSortOption] = useState('title') @@ -235,7 +233,6 @@ export function CoursesOverview() { selectedStudyAreaCodes.join('|'), selectedTerms.join('|'), showOnlyOpenMandatory, - showOnlyReviewed, showUnconfirmedOfferings, sortOption, timeFromDigits, @@ -249,7 +246,6 @@ export function CoursesOverview() { selectedStudyAreaCodes, selectedTerms, showOnlyOpenMandatory, - showOnlyReviewed, showUnconfirmedOfferings, sortOption, timeFromDigits, @@ -458,11 +454,6 @@ export function CoursesOverview() { ) { return false } - // Same "has a displayable rating" test the card chip uses, so the - // filter can never disagree with what the cards show. - if (showOnlyReviewed && !shouldShowRatingChip(course.rating)) { - return false - } if ( !shouldShowUnconfirmedOfferings && !isDefaultVisibleOfferingStatus(offeringStatusByCourseId.get(course.id)) @@ -490,7 +481,6 @@ export function CoursesOverview() { selectedTerms, shouldShowUnconfirmedOfferings, showOnlyOpenMandatory, - showOnlyReviewed, sortOption, studyProgramCode, timeWindow, @@ -508,7 +498,6 @@ export function CoursesOverview() { + selectedTerms.length + selectedCourseTypes.length + (showOnlyOpenMandatory ? 1 : 0) - + (showOnlyReviewed ? 1 : 0) + (showUnconfirmedOfferings ? 1 : 0) const hasActiveFilters = activeFilterCount > 0 @@ -546,7 +535,6 @@ export function CoursesOverview() { setSelectedTerms([]) setSelectedCourseTypes([]) setShowOnlyOpenMandatory(false) - setShowOnlyReviewed(false) setShowUnconfirmedOfferings(false) } @@ -757,16 +745,6 @@ export function CoursesOverview() { ))} - - -
- setShowOnlyReviewed((current) => !current)} - /> -
-
diff --git a/frontend/src/features/i18n/translations.ts b/frontend/src/features/i18n/translations.ts index f994729..767e56f 100644 --- a/frontend/src/features/i18n/translations.ts +++ b/frontend/src/features/i18n/translations.ts @@ -196,6 +196,7 @@ export const TRANSLATIONS = { 'reviews.loading': 'Loading reviews...', 'reviews.empty': 'No reviews yet. Be the first to share your experience.', 'reviews.count': '{count} reviews', + 'reviews.countOne': '1 review', 'reviews.overallLabel': 'Overall', 'reviews.optionalRatings': 'Optional ratings', 'reviews.examLabel': 'Exam and assessment', @@ -516,6 +517,7 @@ export const TRANSLATIONS = { 'reviews.loading': 'Bewertungen werden geladen...', 'reviews.empty': 'Noch keine Bewertungen. Teile als Erste oder Erster deine Erfahrung.', 'reviews.count': '{count} Bewertungen', + 'reviews.countOne': '1 Bewertung', 'reviews.overallLabel': 'Gesamt', 'reviews.optionalRatings': 'Optionale Bewertungen', 'reviews.examLabel': 'Prüfung und Bewertung', diff --git a/frontend/src/features/reviews/components/CourseReviewsSection.tsx b/frontend/src/features/reviews/components/CourseReviewsSection.tsx index 73f3c28..38fd185 100644 --- a/frontend/src/features/reviews/components/CourseReviewsSection.tsx +++ b/frontend/src/features/reviews/components/CourseReviewsSection.tsx @@ -46,7 +46,9 @@ function SummaryHeadline({ summary }: { summary: CourseReviewSummary }) { size="sm" /> - {t('reviews.count', { count: String(summary.count) })} + {summary.count === 1 + ? t('reviews.countOne') + : t('reviews.count', { count: String(summary.count) })}