Working now
This commit is contained in:
37
src/ui/Highscore.vue
Normal file
37
src/ui/Highscore.vue
Normal 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>
|
||||
Reference in New Issue
Block a user