remove twig for index page

This commit is contained in:
Zutatensuppe 2021-05-01 08:51:52 +02:00
parent 9e3a6721c9
commit 93708f0cf0
3 changed files with 35 additions and 42 deletions

View file

@ -10,11 +10,6 @@ export default {
GameTeaser,
ImageTeaser,
},
props: {
gamesRunning: Array,
gamesFinished: Array,
images: Array,
},
template: `
<div id="app">
<h1>Running games</h1>
@ -72,8 +67,19 @@ export default {
tiles: 1000,
image: '',
scoreMode: GameCommon.SCORE_MODE_ANY,
gamesRunning: [],
gamesFinished: [],
images: [],
}
},
async created() {
const res = await fetch('/api/index-data')
const json = await res.json()
this.gamesRunning = json.gamesRunning
this.gamesFinished = json.gamesFinished
this.images = json.images
},
methods: {
time(start, end) {
const icon = end ? '🏁' : '⏳'