Lint frontend
This commit is contained in:
@@ -32,8 +32,8 @@ const champions = computed(() => {
|
||||
|
||||
return championsData.value
|
||||
.slice(1)
|
||||
.filter((champion: any) => !champion.name.includes('Doom Bot'))
|
||||
.sort((a: any, b: any) => a.name.localeCompare(b.name))
|
||||
.filter((champion: ChampionSummary) => !champion.name.includes('Doom Bot'))
|
||||
.sort((a: ChampionSummary, b: ChampionSummary) => a.name.localeCompare(b.name))
|
||||
})
|
||||
|
||||
const lanesMap = computed(() => {
|
||||
@@ -64,7 +64,7 @@ function filterChampionsByLane(laneFilter: number): void {
|
||||
}
|
||||
|
||||
const laneName = filterToLane(laneFilter)
|
||||
filteredChampions.value = champions.value.filter((champion: any) => {
|
||||
filteredChampions.value = champions.value.filter((champion: ChampionSummary) => {
|
||||
const championLanes = lanesMap.value.get(champion.alias.toLowerCase())
|
||||
if (!championLanes) return false
|
||||
|
||||
@@ -77,14 +77,14 @@ const debouncedSearch = debounce((searchTerm: string) => {
|
||||
if (isEmpty(searchTerm)) {
|
||||
filteredChampions.value = [...champions.value]
|
||||
} else {
|
||||
filteredChampions.value = champions.value.filter((champion: any) =>
|
||||
filteredChampions.value = champions.value.filter((champion: ChampionSummary) =>
|
||||
champion.name.toLowerCase().includes(searchTerm.toLowerCase())
|
||||
)
|
||||
}
|
||||
}, 300)
|
||||
|
||||
// Watchers
|
||||
watch(searchBar, (newS, oldS) => {
|
||||
watch(searchBar, (_newS, _oldS) => {
|
||||
searchBar.value?.focus()
|
||||
})
|
||||
|
||||
@@ -124,7 +124,7 @@ const isLoading = computed(() => loadingChampions.value || loadingLanes.value)
|
||||
<div>
|
||||
<!-- Loading state -->
|
||||
<div v-if="isLoading" class="loading-state">
|
||||
<div class="loading-spinner"/>
|
||||
<div class="loading-spinner" />
|
||||
<p>Loading champions...</p>
|
||||
</div>
|
||||
|
||||
@@ -146,7 +146,7 @@ const isLoading = computed(() => loadingChampions.value || loadingLanes.value)
|
||||
@keyup.enter="
|
||||
() => filteredChampions.length > 0 && navigateToChampion(filteredChampions[0].alias)
|
||||
"
|
||||
>
|
||||
/>
|
||||
</div>
|
||||
|
||||
<!-- Empty state -->
|
||||
|
||||
Reference in New Issue
Block a user