diff --git a/pages/loots/index.vue b/pages/loots/index.vue index 809d4c2..f435aa6 100644 --- a/pages/loots/index.vue +++ b/pages/loots/index.vue @@ -22,7 +22,7 @@
- +
{{ loot.name }}
@@ -43,6 +43,7 @@ import Pagination from "../../components/Pagination.vue"; import useClient from '../../composables/useClient'; import useIsNumeric from "../../composables/useIsNumeric"; import usePagination from '../../composables/usePagination'; +import { Loot } from '../../core/models'; const { client } = useClient(); @@ -69,4 +70,13 @@ const p = computed(() => { return usePagination(filtered, 100); }); + +const summaries = await client.championSummaries.listAsync({locale: "default", version: "latest"}); + +const getLootImage = (loot: Loot) => { + if (loot.type.includes('Statstone')) + return summaries.find((x) => loot.name.toLowerCase().includes(x.name.toLowerCase()))?.getIcon({locale: "default", version: "latest"}); + + return loot.getImage('latest'); +} \ No newline at end of file