Click dates send to history page for given lottery.
This commit is contained in:
@@ -22,7 +22,9 @@
|
|||||||
<h4 class="el-spacing">Flasker vunnet:</h4>
|
<h4 class="el-spacing">Flasker vunnet:</h4>
|
||||||
|
|
||||||
<div v-for="win in winner.highscore">
|
<div v-for="win in winner.highscore">
|
||||||
<span class="date-won">{{ humanReadableDate(win.date) }} - {{ daysAgo(win.date) }} dager siden</span>
|
<router-link :to="winDateUrl(win.date)" class="days-ago">
|
||||||
|
{{ humanReadableDate(win.date) }} - {{ daysAgo(win.date) }} dager siden
|
||||||
|
</router-link>
|
||||||
|
|
||||||
<div class="won-wine">
|
<div class="won-wine">
|
||||||
<img :src="win.wine.image">
|
<img :src="win.wine.image">
|
||||||
@@ -81,6 +83,10 @@ export default {
|
|||||||
})
|
})
|
||||||
return colorOccurences
|
return colorOccurences
|
||||||
},
|
},
|
||||||
|
winDateUrl(date) {
|
||||||
|
const timestamp = new Date(date).getTime();
|
||||||
|
return `/history/${timestamp}`
|
||||||
|
},
|
||||||
humanReadableDate: humanReadableDate,
|
humanReadableDate: humanReadableDate,
|
||||||
daysAgo: daysAgo
|
daysAgo: daysAgo
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user