Working now

This commit is contained in:
Kasper Rynning-Tønnesen
2020-01-20 16:07:40 +01:00
parent 53e54726ca
commit 51c2ee2a0e
29 changed files with 11278 additions and 63 deletions

37
src/ui/Highscore.vue Normal file
View File

@@ -0,0 +1,37 @@
<template>
<div>
<h3>Highscore</h3>
<ol>
<li v-for="person in highscore">
{{ person.name }} - {{ person.wins.length }}
</li>
</ol>
</div>
</template>
<script>
export default {
data() {
return { highscore: [] };
},
async mounted() {
let _response = await fetch(
"http://localhost:30030/api/highscore/statistics"
);
let response = await _response.json();
this.highscore = response;
}
};
</script>
<style lang="scss" scoped>
div {
font-family: sans-serif;
width: 70vw;
margin: auto;
display: flex;
justify-content: center;
align-items: center;
flex-direction: column;
}
</style>