From 24b29b20e74c35101c9a5d1c0c7833be0f2a936b Mon Sep 17 00:00:00 2001
From: zainuldeen <78583049+Zain-ul-din@users.noreply.github.com>
Date: Wed, 3 Apr 2024 03:03:26 +0500
Subject: [PATCH] feat: updated render
---
src/components/election/Candidates.tsx | 2 +-
src/lib/election.ts | 1 +
2 files changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/components/election/Candidates.tsx b/src/components/election/Candidates.tsx
index 9defc71..47273d2 100644
--- a/src/components/election/Candidates.tsx
+++ b/src/components/election/Candidates.tsx
@@ -163,7 +163,7 @@ export default function Candidates() {
{users[candidate.uid].displayName}
- Total Votes Received: {candidate.votes.length}
+ Total Votes Received: {candidate.vote_count}
) : (
diff --git a/src/lib/election.ts b/src/lib/election.ts
index 67f243d..4157c31 100644
--- a/src/lib/election.ts
+++ b/src/lib/election.ts
@@ -46,4 +46,5 @@ export interface CandidateDocType {
created_at: FieldValue;
updated_at: FieldValue;
votes: Array;
+ vote_count: number;
}