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
+3 -5
View File
@@ -6,17 +6,15 @@
interface Props {
title: string;
href: string;
id: string;
description?: string;
index?: number;
icon?: Component<{ size?: number; class?: string }>;
}
let { title, href, description, index, icon }: Props = $props();
let normalizedHref = $derived(href === "#" ? "/" : href);
let { title, id, description, index, icon }: Props = $props();
</script>
<a class="tool-card" href={resolve(normalizedHref)}>
<a class="tool-card" href={resolve("/preview/tools/[id]", { id })}>
{#if icon}<span class="tool-icon"><Icon {icon} size={19} /></span>{/if}
<span class="tool-copy">
<strong>{title}</strong>