Skip to content

Commit 2c8d302

Browse files
authored
Fix heatmap total contributions (#14141)
1 parent 5a94db3 commit 2c8d302

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

web_src/js/components/ActivityHeatmap.vue

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<template>
22
<div id="user-heatmap">
33
<div class="total-contributions">
4-
{{ values.length }} contributions in the last 12 months
4+
{{ sum }} contributions in the last 12 months
55
</div>
66
<calendar-heatmap
77
:locale="locale"
@@ -40,6 +40,15 @@ export default {
4040
no_contributions: 'No contributions',
4141
},
4242
}),
43+
computed: {
44+
sum() {
45+
let s = 0;
46+
for (let i = 0; i < this.values.length; i++) {
47+
s += this.values[i].count;
48+
}
49+
return s;
50+
}
51+
}
4352
};
4453
</script>
4554
<style scoped/>

0 commit comments

Comments
 (0)