Feat/personal highscore #44

Merged
KevinMidboe merged 19 commits from feat/personal-highscore into master 2020-10-11 16:19:52 +00:00
Showing only changes of commit 1383a310b3 - Show all commits

View File

@@ -27,7 +27,7 @@
</router-link>
<div class="won-wine">
<img :src="win.wine.image">
<img :src="smallerWineImage(win.wine.image)">
<div class="wine-details">
<h3>{{ win.wine.name }}</h3>
@@ -71,6 +71,11 @@ export default {
this.winner = winner
this.winningColors = this.findWinningColors()
},
smallerWineImage(image) {
if (image && image.includes(`515x515`))
return image.replace(`515x515`, `175x175`)
return image
},
findWinningColors() {
const colors = this.winner.highscore.map(win => win.color)
const colorOccurences = {}