Fix constellation number on list view

pull/1/head
Made Baruna 2021-10-16 22:52:59 +07:00
parent ac299d7023
commit fc34169d58
No known key found for this signature in database
GPG Key ID: 5AA5DA16AA5DCEAD
1 changed files with 7 additions and 4 deletions

View File

@ -458,14 +458,17 @@
<td class="rarity w-16 sticky" style="padding: 0; left: 0px;">
<img class="w-12 h-12 rounded-full" src={`/images/characters/${id}.png`} alt={char.name} />
</td>
<td>{char.name}</td>
<td><a href="/characters/{id}">{char.name}</a></td>
<td class="text-center">
<img class="w-8 h-8 inline" src={`/images/elements/${char.element.id}.png`} alt={char.element.name} />
</td>
<td class="text-center">
C{constellation[id]
? Math.max(0, constellation[id].default + constellation[id].wish + constellation[id].manual - 1)
: 0}
{constellation[id]
? `C${Math.max(
0,
constellation[id].default + constellation[id].wish + constellation[id].manual - 1,
)}`
: '-'}
</td>
<td class="text-center">
<Icon color={char.rarity === 5 ? '#B9812E' : '#AD76B0'} path={mdiStar} />