HistoryPage shows winners from prev lotteries.

The design of this pages sucks, but Winners.vue matched pretty well.
Need to have it's own design.
This commit is contained in:
2020-06-14 14:29:11 +02:00
committed by KevinMidboe
parent f059d6f662
commit b4b6643581

View File

@@ -0,0 +1,34 @@
<template>
<div>
<h1>Historie fra tidligere lotteri</h1>
<div v-if="lotteries.length" v-for="lottery in lotteries">
<Winners :winners="lottery.winners" :title="`Vinnere fra ${lottery.dateString}`" />
</div>
</div>
</template>
<script>
import { historyAll } from '@/api'
import Winners from '@/ui/Winners'
export default {
name: 'History page of prev lotteries',
components: { Winners },
data() {
return {
lotteries: [],
}
},
created() {
historyAll()
.then(history => this.lotteries = history.lotteries.reverse())
}
}
</script>
<style lang="scss" scoped>
h1 {
text-align: center;
}
</style>