bugfix: fix sorting of players by score in highscore table
This commit is contained in:
parent
5c2b99a909
commit
376a9f5642
@ -20,14 +20,18 @@
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { computed } from 'vue'
|
||||
import { usePlayersStore } from '@/stores/PlayersStore'
|
||||
import { useGameinfoStore } from "@/stores/GameinfoStore"
|
||||
|
||||
const title = useGameinfoStore().gameInfo.name
|
||||
const players = usePlayersStore().players
|
||||
players.sort((a, b) => {
|
||||
const players = computed(() => {
|
||||
const p = usePlayersStore().players
|
||||
p.sort((a, b) => {
|
||||
return b.score - a.score
|
||||
})
|
||||
return p
|
||||
})
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
|
Loading…
Reference in New Issue
Block a user