mirror of
https://github.com/BlossomiShymae/clean-cuts.git
synced 2025-12-06 18:20:47 +01:00
Add sorting
This commit is contained in:
@@ -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);
|
||||
</script>
|
||||
@@ -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);
|
||||
</script>
|
||||
@@ -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);
|
||||
</script>
|
||||
@@ -44,11 +44,11 @@
|
||||
<script setup lang="ts">
|
||||
import Pagination from '~/components/Pagination.vue';
|
||||
import useClient from '../../composables/useClient';
|
||||
import { SummonerIcon } from '../../core/models';
|
||||
import usePagination from '../../composables/usePagination';
|
||||
|
||||
const { client } = useClient();
|
||||
|
||||
const icons = await client.summonerIcons.listAsync({locale: "default", version: "latest"});
|
||||
const icons = (await client.summonerIcons.listAsync({locale: "default", version: "latest"}))
|
||||
.sort((a, b) => a.id - b.id);
|
||||
const { count, pages, index, prev, next, first, last } = usePagination(icons, 100);
|
||||
</script>
|
||||
Reference in New Issue
Block a user