From 2f2d1156dd3e9e82fa98a820a8967c3362991cd0 Mon Sep 17 00:00:00 2001 From: Tim <47184194+imgde@users.noreply.github.com> Date: Wed, 18 Jun 2025 22:54:32 +0200 Subject: [PATCH] Fix Rating Filter --- 01-frontend/src/pages/Home.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/01-frontend/src/pages/Home.tsx b/01-frontend/src/pages/Home.tsx index 0d69d07..e302a53 100644 --- a/01-frontend/src/pages/Home.tsx +++ b/01-frontend/src/pages/Home.tsx @@ -79,8 +79,8 @@ export default function Home() { }) .filter((item) => { if (!selectedRating) return true; - const rating = Math.trunc(item.rating); - return rating === (Number(selectedRating) * 2) -1 || rating === (Number(selectedRating) * 2); + const rating = item.rating; + return rating >= (Number(selectedRating) * 2); }) .filter((item) => { if (!searchQuery) return true;