Skip to content

Commit 03f3efd

Browse files
committed
refactor: remove unused transition config from Item component
1 parent 0190c92 commit 03f3efd

File tree

2 files changed

+9
-11
lines changed

2 files changed

+9
-11
lines changed

src/lib/components/Item.svelte

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
import { Avatar, Tooltip } from "bits-ui";
99
import Image from "lucide-svelte/icons/image";
1010
import { getContext } from "svelte";
11-
import { type FadeParams } from "svelte/transition";
1211
import Content from "./item/item-content.svelte";
1312
1413
type Props = {
@@ -20,9 +19,8 @@
2019
name: string;
2120
icon: string;
2221
};
23-
inTransitionConfig?: FadeParams;
2422
};
25-
let { piece, isInventory, showCount, showRecombobulated, tab, inTransitionConfig }: Props = $props();
23+
let { piece, isInventory, showCount, showRecombobulated, tab }: Props = $props();
2624
2725
const skyblockItem = $derived(piece as ProcessedSkyBlockItem);
2826
const bgColor = $derived(getRarityClass(piece.rarity ?? ("common".toLowerCase() as string), "bg"));

src/lib/sections/stats/Inventory.svelte

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -185,8 +185,8 @@
185185
{/if}
186186
</CollapsibleSection>
187187

188-
{#snippet itemSnippet(item: ProcessedSkyBlockItem, index: number, tab?: { name: string; icon: string })}
189-
<Item piece={item} isInventory={true} showRecombobulated={false} showCount={true} inTransitionConfig={{ duration: 300, delay: 5 * (index + 1) }} {tab} />
188+
{#snippet itemSnippet(item: ProcessedSkyBlockItem, tab?: { name: string; icon: string })}
189+
<Item piece={item} isInventory={true} showRecombobulated={false} showCount={true} {tab} />
190190
{/snippet}
191191

192192
{#snippet emptyItem()}
@@ -203,10 +203,10 @@
203203
<p class="mx-auto w-fit leading-6">No items found.</p>
204204
{:else if searchValue !== ""}
205205
<div class="grid grid-cols-[repeat(9,minmax(1.875rem,4.875rem))] place-content-center gap-1 pt-5 @md:gap-1.5 @xl:gap-2">
206-
{#each searchedItems as item, index}
206+
{#each searchedItems as item}
207207
{#if item.item}
208208
<div class="bg-text/[0.04] flex aspect-square items-center justify-center rounded-sm">
209-
{@render itemSnippet(item.item, index, item.sourceTab)}
209+
{@render itemSnippet(item.item, item.sourceTab)}
210210
</div>
211211
{:else}
212212
{@render emptyItem()}
@@ -224,7 +224,7 @@
224224
<div use:builder.action {...builder} class="group">
225225
{#if item.texture_path}
226226
<div class="group-data-[state=active]:bg-text/10 group-data-[state=inactive]:bg-text/[0.04] flex aspect-square items-center justify-center rounded-sm">
227-
{@render itemSnippet(item, index)}
227+
{@render itemSnippet(item)}
228228
</div>
229229
{:else}
230230
{@render emptyItem()}
@@ -246,7 +246,7 @@
246246
<Tabs.Content value={index.toString()}>
247247
{#if containedItem.texture_path}
248248
<div class="bg-text/[0.04] flex aspect-square items-center justify-center rounded-sm">
249-
{@render itemSnippet(containedItem, index2)}
249+
{@render itemSnippet(containedItem)}
250250
</div>
251251
{:else}
252252
{@render emptyItem()}
@@ -271,9 +271,9 @@
271271
{#if item.texture_path}
272272
<div class="bg-text/[0.04] flex aspect-square items-center justify-center rounded-sm">
273273
{#if tab.id === "inv"}
274-
{@render itemSnippet({ ...item, rarity: item.rarity ?? "uncommon" } as ProcessedSkyBlockItem, index)}
274+
{@render itemSnippet({ ...item, rarity: item.rarity ?? "uncommon" } as ProcessedSkyBlockItem)}
275275
{:else}
276-
{@render itemSnippet(item, index)}
276+
{@render itemSnippet(item)}
277277
{/if}
278278
</div>
279279
{:else}

0 commit comments

Comments
 (0)