From 4a3280741767e57bf68887362441eda7b142e19e Mon Sep 17 00:00:00 2001 From: Vito0912 <86927734+Vito0912@users.noreply.github.com> Date: Sat, 14 Dec 2024 18:06:07 +0100 Subject: [PATCH] fixed date --- client/components/stats/YearInReviewBanner.vue | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/client/components/stats/YearInReviewBanner.vue b/client/components/stats/YearInReviewBanner.vue index 2d6cd9c96..5529f5ebb 100644 --- a/client/components/stats/YearInReviewBanner.vue +++ b/client/components/stats/YearInReviewBanner.vue @@ -105,6 +105,9 @@ export default { computed: { isAdminOrUp() { return this.$store.getters['user/getIsAdminOrUp'] + }, + user() { + return this.$store.state.user.user } }, methods: { @@ -132,8 +135,8 @@ export default { this.showYearInReview = !this.showYearInReview }, eventOptions() { - if(this.$store.getters['libraries/getCurrentLibrary']) { - const oldestDate = this.$store.getters['libraries/getCurrentLibrary'].createdAt + if(this.user) { + const oldestDate = this.user.createdAt if (oldestDate) { const date = new Date(oldestDate) const oldestYear = date.getFullYear()