Skip to content

Commit

Permalink
increase community data update interval (5s > 10s)
Browse files Browse the repository at this point in the history
  • Loading branch information
naltatis committed Nov 8, 2022
1 parent e5b55e2 commit 1687942
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 21 deletions.
6 changes: 4 additions & 2 deletions assets/js/components/LiveCommunity.vue
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@ import SavingsTile from "./SavingsTile.vue";
import formatter from "../mixins/formatter";
import communityApi from "../communityApi";
const UPDATE_INTERVAL_SECONDS = 10;
export default {
name: "LiveCommunity",
components: { SavingsTile },
Expand Down Expand Up @@ -80,10 +82,10 @@ export default {
},
},
async mounted() {
this.refresh = setInterval(this.update, 5000);
this.refresh = setInterval(this.update, UPDATE_INTERVAL_SECONDS * 1e3);
await this.update();
this.$nextTick(() => {
this.animationDuration = 5;
this.animationDuration = UPDATE_INTERVAL_SECONDS;
});
},
unmounted() {
Expand Down
Loading

0 comments on commit 1687942

Please sign in to comment.