From 2db643b49faf659147a10e7c66c489c9461b1c80 Mon Sep 17 00:00:00 2001 From: Blossomi Shymae <87099578+BlossomiShymae@users.noreply.github.com> Date: Thu, 2 May 2024 09:46:48 -0500 Subject: [PATCH] Add sorting --- pages/champions/index.vue | 3 ++- pages/runes/index.vue | 3 ++- pages/summoner-emotes/index.vue | 3 ++- pages/summoner-icons/index.vue | 4 ++-- 4 files changed, 8 insertions(+), 5 deletions(-) diff --git a/pages/champions/index.vue b/pages/champions/index.vue index beb1f77..1ced334 100644 --- a/pages/champions/index.vue +++ b/pages/champions/index.vue @@ -40,5 +40,6 @@ import useClient from '../../composables/useClient'; const { client } = useClient(); -const summaries = await client.championSummaries.listAsync({locale: "default", version: "latest"}); +const summaries = (await client.championSummaries.listAsync({locale: "default", version: "latest"})) + .filter((x) => x.id != -1); \ No newline at end of file diff --git a/pages/runes/index.vue b/pages/runes/index.vue index 4098167..b9e9245 100644 --- a/pages/runes/index.vue +++ b/pages/runes/index.vue @@ -37,5 +37,6 @@ import useClient from '../../composables/useClient'; const { client } = useClient(); -const runes = await client.perks.listAsync({locale: "default", version: "latest"}); +const runes = (await client.perks.listAsync({locale: "default", version: "latest"})) + .sort((a, b) => a.id - b.id); \ No newline at end of file diff --git a/pages/summoner-emotes/index.vue b/pages/summoner-emotes/index.vue index 5b50d5b..c92fd03 100644 --- a/pages/summoner-emotes/index.vue +++ b/pages/summoner-emotes/index.vue @@ -30,6 +30,7 @@ import usePagination from '../../composables/usePagination'; const { client } = useClient();; -const emotes = await client.summonerEmotes.listAsync({locale: "default", version: "latest"}); +const emotes = (await client.summonerEmotes.listAsync({locale: "default", version: "latest"})) + .sort((a, b) => a.id - b.id); const { count, pages, index, prev, next, first, last } = usePagination(emotes, 24); \ No newline at end of file diff --git a/pages/summoner-icons/index.vue b/pages/summoner-icons/index.vue index a632c26..b531f6a 100644 --- a/pages/summoner-icons/index.vue +++ b/pages/summoner-icons/index.vue @@ -44,11 +44,11 @@ \ No newline at end of file