Skip to content

Commit

Permalink
fix(home): fix releases calc & features centering 🐛
Browse files Browse the repository at this point in the history
  • Loading branch information
PierreBrisorgueil committed Jul 24, 2020
1 parent c136feb commit 1dbf416
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/modules/home/components/home.features.component.vue
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
class="display-1 font-weight-bold mb-3 pb-8 text-uppercase"
v-if="features.title"
>{{ features.title }}</h2>
<v-row>
<v-row justify="center">
<v-col
v-for="({ icon, title, text }, i) in features.data"
:key="i"
Expand Down
7 changes: 4 additions & 3 deletions src/modules/home/stores/home.store.js
Original file line number Diff line number Diff line change
Expand Up @@ -107,9 +107,10 @@ const mutations = {
// statistics
statistics_set(state, data) {
state.statistics[0].value = data.tasks;
state.statistics[1].value = _.sum(
_.flatten(data.releases.map((release) => (release.list[0].name[0] === 'v' ? release.list[0].name.substr(1).split('.') : release.list[0].name.split('.')))).map((x) => +x),
);
state.statistics[1].value = _.sum(_.flatten(data.releases.map((release) => {
if (release.list.length) return release.list[0].name[0] === 'v' ? release.list[0].name.substr(1).split('.') : release.list[0].name.split('.');
return 0;
})).map((x) => +x));
state.statistics[2].value = data.users;
},
};
Expand Down

0 comments on commit 1dbf416

Please sign in to comment.