updated hall of fame

This commit is contained in:
nvrl committed 2026-06-16 14:24:15 +02:00
1 parent 34fdb3e2ce
commit a39c28d807
5 files changed
+13 -15

No files matched your search

+1 -3
View File
@@ -39,9 +39,7 @@ export const BackButton: React.FC<BackButtonProps> = ({ to, sx }) => {
const label = to || !canGoBack ? t('common.backToHome') : t('common.back'); const label = to || !canGoBack ? t('common.backToHome') : t('common.back');
const linkProps = to const linkProps = to ? { component: Link as React.ElementType, to } : { onClick: handleGoBack };
? { component: Link as React.ElementType, to }
: { onClick: handleGoBack };
return ( return (
<Button <Button
+6 -6
View File
@@ -1,4 +1,4 @@
import React, { useEffect, useMemo, useRef, useState } from 'react'; import React, { useEffect, useRef, useState } from 'react';
import { import {
Typography, Typography,
Box, Box,
@@ -107,11 +107,11 @@ const MainPage: React.FC = () => {
const currentTop = topFlavors[safeIndex]; const currentTop = topFlavors[safeIndex];
// Feature the highest-scored review with a comment, not just the first one — // Feature the highest-scored review with a comment, not just the first one —
// a Hall-of-Fame quote should be the most glowing, not whatever loaded first. // a Hall-of-Fame quote should be the most glowing, not whatever loaded first.
const featuredReview = useMemo(() => { const featuredReview = (currentTop?.ratings ?? [])
const withComment = (currentTop?.ratings ?? []).filter((r) => r.comment); .filter((r) => r.comment)
if (withComment.length === 0) return null; .reduce<
return withComment.reduce((best, r) => (r.score > best.score ? r : best)); (typeof currentTop)['ratings'][number] | null
}, [currentTop]); >((best, r) => (best === null || r.score > best.score ? r : best), null);
useTitle(query ? `Search: ${query}` : 'Holy Flavors Archive'); useTitle(query ? `Search: ${query}` : 'Holy Flavors Archive');
@@ -37,10 +37,7 @@ const CategoryFlavors: React.FC = () => {
<SectionHeader title={categoryName || t('home.flavorsFallback')} /> <SectionHeader title={categoryName || t('home.flavorsFallback')} />
{flavors.length === 0 ? ( {flavors.length === 0 ? (
<EmptyState <EmptyState title={t('home.noCategoryFlavors')} subtitle={t('home.noCategoryFlavorsSub')} />
title={t('home.noCategoryFlavors')}
subtitle={t('home.noCategoryFlavorsSub')}
/>
) : ( ) : (
<Box <Box
sx={{ sx={{
+4 -1
View File
@@ -227,7 +227,10 @@ const FlavorDetail: React.FC = () => {
</Box> </Box>
)} )}
<Typography variant="body2" sx={{ lineHeight: 1.7, color: 'text.secondary', mb: 4 }}> <Typography
variant="body2"
sx={{ lineHeight: 1.7, color: 'text.secondary', mb: 4 }}
>
<RichText text={flavor.description} /> <RichText text={flavor.description} />
</Typography> </Typography>
+1 -1
View File
@@ -19,7 +19,7 @@ Tracking doc from the frontend/UX audit. Items grouped by priority. Check off as
## 🟡 Medium ## 🟡 Medium
- [ ] **#5 Hall of Fame carousel** — no swipe/auto-advance; arrows far from card on mobile; featured quote is arbitrary (first-with-comment). - [x] **#5 Hall of Fame carousel** (`MainPage.tsx`) — added 6s auto-advance (stops on manual control, pauses on hover, off for reduced-motion), touch swipe, on-card overlay arrows on mobile (header arrows desktop-only), and featured quote now picks the highest-scored comment instead of the first.
- [x] **#6 Admin edit leaks into product card** (`FlavorDetail.tsx`) — extracted to `components/AdminFlavorEditDialog.tsx`; card keeps a clean read view, edit opens a focused dialog. - [x] **#6 Admin edit leaks into product card** (`FlavorDetail.tsx`) — extracted to `components/AdminFlavorEditDialog.tsx`; card keeps a clean read view, edit opens a focused dialog.
- [ ] **#7 CommunityFeed duplication** — in-page notifications + following duplicate the nav/global menus. - [ ] **#7 CommunityFeed duplication** — in-page notifications + following duplicate the nav/global menus.
- [ ] **#8 Reply Enter-to-submit on multiline** — surprising; blocks newlines. - [ ] **#8 Reply Enter-to-submit on multiline** — surprising; blocks newlines.