diff --git a/src/components/VinlottisPage.vue b/src/components/VinlottisPage.vue index b608cb3..aafebcb 100644 --- a/src/components/VinlottisPage.vue +++ b/src/components/VinlottisPage.vue @@ -81,14 +81,9 @@ export default { !this.pushAllowed || localStorage.getItem("push") == null ); - }, - todayExists: () => { - return prelottery() - .then(wines => wines.length > 0) - .catch(() => false) } }, - mounted() { + async mounted() { this.$on("push-allowed", () => { this.pushAllowed = true; }); @@ -96,6 +91,11 @@ export default { return; } this.track(); + try { + this.todayExists = (await prelottery()).length > 0; + } catch (e) { + this.todayExists = false; + } }, methods: { requestNotificationAccess() { diff --git a/src/components/VirtualLotteryPage.vue b/src/components/VirtualLotteryPage.vue index 257cb4e..531e588 100644 --- a/src/components/VirtualLotteryPage.vue +++ b/src/components/VirtualLotteryPage.vue @@ -8,9 +8,7 @@ attendeesFetched && winnersFetched " - > - Her var det lite.. Sikker på at det er en virtuell trekning nå? - + >Her var det lite.. Sikker på at det er en virtuell trekning nå?
Send gjerne melding om fargeønsker også
@@ -21,15 +19,11 @@ Se her -