|
3 | 3 | import EmptyItemSlot from "$lib/components/item/EmptyItemSlot.svelte"; |
4 | 4 | import GearSlotColumn from "$lib/components/item/GearSlotColumn.svelte"; |
5 | 5 | import Item from "$lib/components/item/Item.svelte"; |
6 | | - import type { ModelsResolvedLoadout } from "$lib/shared/api/orval-generated"; |
| 6 | + import type { ModelsResolvedLoadout, ModelsStatData } from "$lib/shared/api/orval-generated"; |
7 | 7 | import { titleCase } from "$lib/shared/helper"; |
8 | 8 | import { cn } from "$lib/shared/utils"; |
9 | | - import { getAllStats } from "$src/lib/shared/api/skycrypt-api.remote"; |
10 | 9 | import { Separator } from "$ui/separator"; |
11 | 10 |
|
12 | 11 | type Props = { |
13 | 12 | loadout: ModelsResolvedLoadout; |
14 | 13 | index: number; |
| 14 | + allStats: ModelsStatData[]; |
15 | 15 | class?: string; |
16 | 16 | }; |
17 | 17 |
|
|
22 | 22 | walk_speed: "speed" |
23 | 23 | } as const; |
24 | 24 |
|
25 | | - let { loadout, index, class: className }: Props = $props(); |
| 25 | + let { loadout, index, allStats, class: className }: Props = $props(); |
26 | 26 |
|
27 | 27 | const name = $derived(loadout.name?.trim() || `Loadout ${index + 1}`); |
28 | 28 | const armor = $derived(loadout.armor ?? []); |
29 | 29 | const equipment = $derived(loadout.equipment ?? []); |
30 | 30 | const pet = $derived(loadout.pet); |
31 | 31 | const tuningPoints = $derived(Object.entries(loadout.accessories?.tuningPoints ?? {})); |
32 | 32 | const powerStone = $derived(loadout.accessories?.powerStone ? titleCase(loadout.accessories.powerStone) : "None"); |
33 | | - const allStats = await getAllStats(); |
34 | | -
|
35 | 33 | function selectedSlot(value: number | undefined): string { |
36 | 34 | return value ? value.toString() : "None"; |
37 | 35 | } |
|
0 commit comments