fix: update tool card component - route resolve issue

This commit is contained in:
2026-09-07 12:30:32 +05:00
parent 20e07fae85
commit 987f4535c8
4 changed files with 15 additions and 28 deletions
+10 -21
View File
@@ -22,7 +22,10 @@
import IconButton from "$lib/components/kit/ui/IconButton.svelte";
import Segmented from "$lib/components/kit/ui/Segmented.svelte";
import Toggle from "$lib/components/kit/ui/Toggle.svelte";
import { Download, ImageOff, Palette, Plus, Trash2 } from "@lucide/svelte";
import { Download, ImageOff, Plus, Trash2 } from "@lucide/svelte";
import { TOOLS } from "$lib/registry-new";
import { TOOL_ICONS } from "$lib/preview/tool-icons";
let mode = $state("preview");
let radius = $state(8);
@@ -32,23 +35,9 @@
let lossless = $state(true);
let animated = $state(false);
const tools = [
{
title: "Gradient",
href: "#",
description: "Linear & radial gradients",
},
{
title: "Resize",
href: "#",
description: "Pixel-perfect scaling",
},
{
title: "Quantize",
href: "#",
description: "Reduce color depth",
},
];
const showcaseTools = TOOLS.filter((tool) =>
["linear-gradient-png", "resize-png", "quantize-png"].includes(tool.id),
);
</script>
<div class="showcase">
@@ -152,13 +141,13 @@
<Panel title="Tools" eyebrow="catalog">
<div class="tool-grid">
{#each tools as tool, i (tool.title)}
{#each showcaseTools as tool, i (tool.id)}
<ToolCard
title={tool.title}
href={tool.href}
id={tool.id}
description={tool.description}
index={i + 1}
icon={Palette}
icon={TOOL_ICONS[tool.id]}
/>
{/each}
</div>