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> | ||||
|  | ||||
|         <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"> | ||||
|             <img :src="win.wine.image"> | ||||
| @@ -81,6 +83,10 @@ export default { | ||||
|       }) | ||||
|       return colorOccurences | ||||
|     }, | ||||
|     winDateUrl(date) { | ||||
|       const timestamp = new Date(date).getTime(); | ||||
|       return `/history/${timestamp}` | ||||
|     }, | ||||
|     humanReadableDate: humanReadableDate, | ||||
|     daysAgo: daysAgo | ||||
|   }, | ||||
|   | ||||
		Reference in New Issue
	
	Block a user