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();
|
||||
|
||||
// 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
|
||||
const providerBadge = $derived(
|
||||
font.providerBadge
|
||||
@@ -98,9 +95,9 @@ const stats = $derived([
|
||||
{font.name}
|
||||
</span>
|
||||
|
||||
{#if fontType}
|
||||
{#if font?.category}
|
||||
<Badge size="xs" variant="default" nowrap>
|
||||
{fontType}
|
||||
{font?.category}
|
||||
</Badge>
|
||||
{/if}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user