From 17beadd6d935ef9a7d08f6e93107aad0f5d362c7 Mon Sep 17 00:00:00 2001 From: Nils Pukropp Date: Mon, 16 Feb 2026 21:05:08 +0100 Subject: [PATCH] fixed communityfeed spacing for mobile --- frontend/src/pages/CommunityFeed.tsx | 12 ++++- frontend/src/pages/MainPage.tsx | 79 +++++++++++++++++----------- 2 files changed, 57 insertions(+), 34 deletions(-) diff --git a/frontend/src/pages/CommunityFeed.tsx b/frontend/src/pages/CommunityFeed.tsx index c42d314..559c654 100644 --- a/frontend/src/pages/CommunityFeed.tsx +++ b/frontend/src/pages/CommunityFeed.tsx @@ -11,6 +11,7 @@ import { Rating as MuiRating, Button } from '@mui/material'; +import StarIcon from '@mui/icons-material/Star'; import { Link } from 'react-router-dom'; import api from '../api'; import { useTitle } from '../hooks/useTitle'; @@ -111,8 +112,15 @@ const CommunityFeed: React.FC = () => { - - {rating.score}/10 + {/* Compact rating for mobile, stars for desktop */} + + + {rating.score}/10 + + + + {rating.score}/10 + {rating.comment && ( diff --git a/frontend/src/pages/MainPage.tsx b/frontend/src/pages/MainPage.tsx index 7dc0f32..911780d 100644 --- a/frontend/src/pages/MainPage.tsx +++ b/frontend/src/pages/MainPage.tsx @@ -238,37 +238,45 @@ const MainPage: React.FC = () => { ) : ( {feedRatings.map(rating => ( - - - - - - {!rating.user_avatar && rating.user.charAt(0).toUpperCase()} - - {rating.user} - - rated - - - - - - - {rating.flavor_name} - - - - - {rating.score}/10 - - - - - + + + + + + {!rating.user_avatar && rating.user.charAt(0).toUpperCase()} + + {rating.user} + + rated + + + + + + + {rating.flavor_name} + + + + {/* Compact rating for mobile, stars for desktop */} + + + {rating.score}/10 + + + + {rating.score}/10 + + + + + + + ))} )} @@ -457,7 +465,14 @@ const MainPage: React.FC = () => { {review.user} - + {/* Compact rating for mobile, stars for desktop */} + + + {review.score}/10 + + + + on {review.flavor_name}