fix: calculate Most Prayed For based on Mark Prayed clicks, not prayer count

This commit is contained in:
nmemmert committed 2026-01-16 08:56:23 -05:00
1 parent 8b4109a8fd
commit 649daa3dda
1 file changed
+2 -2
+2 -2
View File
@@ -100,10 +100,10 @@ export default function HomePage({ prayers, todayCount, onStartPraying, onSelect
? Math.round((answeredPrayers / totalPrayers) * 100)
: 0;
// Get most prayed for person/topic
// Get most prayed for person/topic based on lastPrayedFor clicks
const prayerForCounts: Record<string, number> = {};
prayers.forEach(p => {
if (p.prayFor) {
if (p.prayFor && p.lastPrayedFor) {
prayerForCounts[p.prayFor] = (prayerForCounts[p.prayFor] || 0) + 1;
}
});