refactor(FontSampler): remove $derived, since props are already reactive
This commit is contained in:
@@ -43,9 +43,6 @@ interface Props {
|
|||||||
|
|
||||||
let { font, status, text = $bindable(), index = 0 }: Props = $props();
|
let { font, status, text = $bindable(), index = 0 }: Props = $props();
|
||||||
|
|
||||||
// Adjust the property name to match your UnifiedFont type
|
|
||||||
const fontType = $derived((font as any).type ?? (font as any).category ?? '');
|
|
||||||
|
|
||||||
// Extract provider badge with fallback
|
// Extract provider badge with fallback
|
||||||
const providerBadge = $derived(
|
const providerBadge = $derived(
|
||||||
font.providerBadge
|
font.providerBadge
|
||||||
@@ -98,9 +95,9 @@ const stats = $derived([
|
|||||||
{font.name}
|
{font.name}
|
||||||
</span>
|
</span>
|
||||||
|
|
||||||
{#if fontType}
|
{#if font?.category}
|
||||||
<Badge size="xs" variant="default" nowrap>
|
<Badge size="xs" variant="default" nowrap>
|
||||||
{fontType}
|
{font?.category}
|
||||||
</Badge>
|
</Badge>
|
||||||
{/if}
|
{/if}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user