From 3d7f53ce439c52c542df95c6d044a68c23f327bf Mon Sep 17 00:00:00 2001 From: Chaithra S Date: Fri, 27 Mar 2026 23:18:47 +0530 Subject: [PATCH 1/2] reduced size of stall directory --- apps/web/src/components/ProgressScreen.tsx | 67 +++++++++++----------- 1 file changed, 32 insertions(+), 35 deletions(-) diff --git a/apps/web/src/components/ProgressScreen.tsx b/apps/web/src/components/ProgressScreen.tsx index 671766e..84612d5 100644 --- a/apps/web/src/components/ProgressScreen.tsx +++ b/apps/web/src/components/ProgressScreen.tsx @@ -21,17 +21,19 @@ 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 = [] }: 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 (
@@ -67,6 +69,13 @@ export default function ProgressScreen({
{/* Directory Section */}
+
+ 🏆 +

+ You are voting for the People's Choice Award. +

+
+

Stall Directory

@@ -75,36 +84,37 @@ export default function ProgressScreen({
-
+
{Array.from({ length: totalCount }).map((_, index) => { - const status = ratings[String(index + 1)] !== undefined ? 'rated' : 'locked'; + const stallId = index + 1; + const status = index < ratedCount ? 'rated' : 'locked'; return ( {status === 'rated' ? ( - + ) : ( - + )} {status === 'rated' && ( -
+
)} @@ -117,25 +127,12 @@ export default function ProgressScreen({ - {/* Inner subtle glow */} -
-
-
- 🏆 -

- 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. +

{/* Scan Button / Completion Action */} @@ -171,11 +168,11 @@ export default function ProgressScreen({ rel="noopener noreferrer" className="flex items-center justify-center gap-3 hover:opacity-80 transition-opacity" > - DK24 + DK24
From 633114e0309c820d75bd225fc52559131387a732 Mon Sep 17 00:00:00 2001 From: Chaithra S Date: Fri, 27 Mar 2026 23:21:04 +0530 Subject: [PATCH 2/2] Revert "reduced size of stall directory" This reverts commit 3d7f53ce439c52c542df95c6d044a68c23f327bf. --- apps/web/src/components/ProgressScreen.tsx | 67 +++++++++++----------- 1 file changed, 35 insertions(+), 32 deletions(-) diff --git a/apps/web/src/components/ProgressScreen.tsx b/apps/web/src/components/ProgressScreen.tsx index 84612d5..671766e 100644 --- a/apps/web/src/components/ProgressScreen.tsx +++ b/apps/web/src/components/ProgressScreen.tsx @@ -21,19 +21,17 @@ 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, - allStalls = [] + serverProgress = 0 }: ProgressScreenProps) { - // Always use the server's synced progress as the ultimate source of truth + // Always use the server's synced progress as the ultimate source of truth, fallback to local if 0 const localRatedCount = Object.keys(ratings).length; - const ratedCount = serverProgress > 0 ? serverProgress : localRatedCount; + const ratedCount = Math.max(serverProgress, localRatedCount); return (
@@ -69,13 +67,6 @@ export default function ProgressScreen({
{/* Directory Section */}
-
- 🏆 -

- You are voting for the People's Choice Award. -

-
-

Stall Directory

@@ -84,37 +75,36 @@ export default function ProgressScreen({
-
+
{Array.from({ length: totalCount }).map((_, index) => { - const stallId = index + 1; - const status = index < ratedCount ? 'rated' : 'locked'; + const status = ratings[String(index + 1)] !== undefined ? 'rated' : 'locked'; return ( {status === 'rated' ? ( - + ) : ( - + )} {status === 'rated' && ( -
+
)} @@ -127,12 +117,25 @@ export default function ProgressScreen({ - ⚠️ -

- Your votes will be counted only if you rate all 11 stalls. -

+ {/* Inner subtle glow */} +
+
+
+ 🏆 +

+ You are voting for the People's Choice Award. +

+
+ +
+ ⚠️ +

+ Your votes will be counted only if you rate all 11 stalls. +

+
+
{/* Scan Button / Completion Action */} @@ -168,11 +171,11 @@ export default function ProgressScreen({ rel="noopener noreferrer" className="flex items-center justify-center gap-3 hover:opacity-80 transition-opacity" > - DK24 + DK24