diff --git a/apps/web/src/components/ProgressScreen.tsx b/apps/web/src/components/ProgressScreen.tsx index 671766e..4bd6c9c 100644 --- a/apps/web/src/components/ProgressScreen.tsx +++ b/apps/web/src/components/ProgressScreen.tsx @@ -21,17 +21,20 @@ interface ProgressScreenProps { ratedStalls?: Array<{ stallId: number, stallName: string, rating: number }>; totalCount?: number; serverProgress?: number; + allStalls?: Array<{ id: number, name: string }>; } export default function ProgressScreen({ onScanNext, ratings = {}, totalCount = 11, - serverProgress = 0 + serverProgress = 0, + //allStalls: _allStalls = [] }: ProgressScreenProps) { - // Always use the server's synced progress as the ultimate source of truth, fallback to local if 0 + // Always use the server's synced progress as the ultimate source of truth const localRatedCount = Object.keys(ratings).length; - const ratedCount = Math.max(serverProgress, localRatedCount); + + const ratedCount = serverProgress > 0 ? serverProgress : localRatedCount; return (
+ You are voting for the People's Choice Award. +
+- You are voting for the People's Choice Award. -
-- Your votes will be counted only if you rate all 11 stalls. -
-+ Your votes will be counted only if you rate all 11 stalls. +