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

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

+
+

Stall Directory

@@ -75,36 +85,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 +128,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 +169,11 @@ export default function ProgressScreen({ rel="noopener noreferrer" className="flex items-center justify-center gap-3 hover:opacity-80 transition-opacity" > - DK24 + DK24
From e07e54b0e2ecd24b7aad0d72d9f25f1e9bdb2a3c Mon Sep 17 00:00:00 2001 From: Chaithra S Date: Fri, 27 Mar 2026 23:33:58 +0530 Subject: [PATCH 4/5] fixed error --- apps/web/src/components/ProgressScreen.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/web/src/components/ProgressScreen.tsx b/apps/web/src/components/ProgressScreen.tsx index baa1d68..7769719 100644 --- a/apps/web/src/components/ProgressScreen.tsx +++ b/apps/web/src/components/ProgressScreen.tsx @@ -29,7 +29,7 @@ export default function ProgressScreen({ ratings = {}, totalCount = 11, serverProgress = 0, - allStalls = [] + allStalls: _allStalls = [] }: ProgressScreenProps) { // Always use the server's synced progress as the ultimate source of truth const localRatedCount = Object.keys(ratings).length; From ede20d261d23e2f4c1417355610b087b11ed8d37 Mon Sep 17 00:00:00 2001 From: Chaithra S Date: Fri, 27 Mar 2026 23:36:35 +0530 Subject: [PATCH 5/5] fix unused variables --- apps/web/src/components/ProgressScreen.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/web/src/components/ProgressScreen.tsx b/apps/web/src/components/ProgressScreen.tsx index 7769719..4bd6c9c 100644 --- a/apps/web/src/components/ProgressScreen.tsx +++ b/apps/web/src/components/ProgressScreen.tsx @@ -29,7 +29,7 @@ export default function ProgressScreen({ ratings = {}, totalCount = 11, serverProgress = 0, - allStalls: _allStalls = [] + //allStalls: _allStalls = [] }: ProgressScreenProps) { // Always use the server's synced progress as the ultimate source of truth const localRatedCount = Object.keys(ratings).length; @@ -227,4 +227,4 @@ export default function ProgressScreen({
); -} \ No newline at end of file +}