matchups: filter out <0.5 or >0.5 for counters
This commit is contained in:
@@ -28,7 +28,7 @@ function getChampionImageUrl(championId: number): string {
|
|||||||
<h2 class="section-title">Strong Against</h2>
|
<h2 class="section-title">Strong Against</h2>
|
||||||
<div v-if="matchups?.length" class="counter-list">
|
<div v-if="matchups?.length" class="counter-list">
|
||||||
<div
|
<div
|
||||||
v-for="(counter, index) in matchups.slice(0, 5)"
|
v-for="(counter, index) in matchups.slice(0, 5).filter(x => x.winrate > 0.5)"
|
||||||
:key="'strong-' + index"
|
:key="'strong-' + index"
|
||||||
class="counter-item"
|
class="counter-item"
|
||||||
@click="navigateTo(`/champion/${counter.championAlias.toLowerCase()}`)"
|
@click="navigateTo(`/champion/${counter.championAlias.toLowerCase()}`)"
|
||||||
@@ -60,7 +60,10 @@ function getChampionImageUrl(championId: number): string {
|
|||||||
<h2 class="section-title">Weak Against</h2>
|
<h2 class="section-title">Weak Against</h2>
|
||||||
<div v-if="matchups?.length" class="counter-list">
|
<div v-if="matchups?.length" class="counter-list">
|
||||||
<div
|
<div
|
||||||
v-for="(counter, index) in matchups.slice(matchups.length - 5, matchups.length).reverse()"
|
v-for="(counter, index) in matchups
|
||||||
|
.slice(matchups.length - (5 < matchups.length ? 5 : matchups.length), matchups.length)
|
||||||
|
.reverse()
|
||||||
|
.filter(x => x.winrate < 0.5)"
|
||||||
:key="'weak-' + index"
|
:key="'weak-' + index"
|
||||||
class="counter-item"
|
class="counter-item"
|
||||||
@click="navigateTo(`/champion/${counter.championAlias.toLowerCase()}`)"
|
@click="navigateTo(`/champion/${counter.championAlias.toLowerCase()}`)"
|
||||||
|
|||||||
Reference in New Issue
Block a user