Fix character badges to fit new character appearances data structure

This commit is contained in:
Xevion
2022-05-11 03:19:10 -05:00
parent e0a7d58b41
commit e3a7e2b708

View File

@@ -1,9 +1,9 @@
<template> <template>
<div class="pt-2" v-if="characters" :fluid="true"> <div class="pt-2" v-if="characters" :fluid="true">
<b-button squared class="mx-2 my-1 character-button" size="sm" v-for="character in characters" <b-button squared class="mx-2 my-1 character-button" size="sm" v-for="(character, character_id) in characters"
:key="character.name" :id="`character-${character.id}`" :key="character.name" :id="`character-${character_id}`"
:title="`${character.appearances} Quote${character.appearances > 1 ? 's' : ''}`" :title="`${character.appearances} Quote${character.appearances > 1 ? 's' : ''}`"
:to="{ name: 'Character', params: { character: character.id } }" :to="{ name: 'Character', params: { character: character_id } }"
> >
{{ character.name }} {{ character.name }}
<b-badge class="ml-1">{{ character.appearances }}</b-badge> <b-badge class="ml-1">{{ character.appearances }}</b-badge>
@@ -15,7 +15,7 @@
export default { export default {
props: { props: {
characters: { characters: {
type: Array, type: Object,
required: true required: true
} }
} }