From 39d1ce4c372ec029d9f1e61e078ef72fb86de8ba Mon Sep 17 00:00:00 2001 From: Ilia Mashkov Date: Mon, 1 Jun 2026 16:49:59 +0300 Subject: [PATCH] refactor(FontSampler): remove $derived, since props are already reactive --- src/features/DisplayFont/ui/FontSampler/FontSampler.svelte | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/features/DisplayFont/ui/FontSampler/FontSampler.svelte b/src/features/DisplayFont/ui/FontSampler/FontSampler.svelte index b214ea1..84ba0f6 100644 --- a/src/features/DisplayFont/ui/FontSampler/FontSampler.svelte +++ b/src/features/DisplayFont/ui/FontSampler/FontSampler.svelte @@ -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} - {#if fontType} + {#if font?.category} - {fontType} + {font?.category} {/if}