From cf07ceb8eda3d6e01713a50b18974c3ce8f45b0d Mon Sep 17 00:00:00 2001
From: mat <github@matdoes.dev>
Date: Sun, 15 May 2022 15:40:11 -0500
Subject: accessory bag extra info

---
 src/lib/sections/Inventories.svelte | 27 +++++++++++++++++++--------
 1 file changed, 19 insertions(+), 8 deletions(-)

(limited to 'src/lib/sections/Inventories.svelte')

diff --git a/src/lib/sections/Inventories.svelte b/src/lib/sections/Inventories.svelte
index 07d5504..1dd7d28 100644
--- a/src/lib/sections/Inventories.svelte
+++ b/src/lib/sections/Inventories.svelte
@@ -3,8 +3,10 @@
 	import Inventory from '$lib/minecraft/Inventory.svelte'
 	import type { MatcherFile } from 'skyblock-assets'
 	import { cleanId } from '$lib/utils'
+	import AccessoryBagUpgrades from './AccessoryBagUpgrades.svelte'
+	import type { CleanMemberProfile } from '$lib/APITypes'
 
-	export let data
+	export let data: CleanMemberProfile
 	export let pack: MatcherFile
 
 	let displayingInventories: string[] = []
@@ -35,13 +37,18 @@
 		{/each}
 	</div>
 {/if}
-{#each displayingInventories as inventoryName}
-	{#if inventoryName === selectedInventoryName}
-		<div id={inventoryName} class="inventory-content">
-			<Inventory items={data.member.inventories[inventoryName]} {pack} name={inventoryName} />
-		</div>
-	{/if}
-{/each}
+{#if data.member.inventories}
+	{#each displayingInventories as inventoryName}
+		{#if inventoryName === selectedInventoryName}
+			<span id={inventoryName} class="inventory-content">
+				<Inventory items={data.member.inventories[inventoryName]} {pack} name={inventoryName} />
+			</span>
+			{#if inventoryName == 'accessory_bag'}
+				<AccessoryBagUpgrades {data} />
+			{/if}
+		{/if}
+	{/each}
+{/if}
 
 <style>
 	#inventory-tabs {
@@ -80,6 +87,10 @@
 		background-color: rgba(40, 40, 40, 0.9);
 	}
 
+	.inventory-content {
+		display: inline-grid;
+	}
+
 	@media only screen and (max-width: 480px) {
 		.inventory-content :global(.item) {
 			/* there's no good way to override the existing 32px size without !important :( */
-- 
cgit 

