- {#each chars as c, index}
- {@render character?.({ char: c.char, index })}
- {/each}
-
+
+{#if fontA && fontB}
+
diff --git a/src/widgets/ComparisonView/ui/Search/Search.svelte.test.ts b/src/widgets/ComparisonView/ui/Search/Search.svelte.test.ts
index 1bd7575..a1ccaf2 100644
--- a/src/widgets/ComparisonView/ui/Search/Search.svelte.test.ts
+++ b/src/widgets/ComparisonView/ui/Search/Search.svelte.test.ts
@@ -1,4 +1,4 @@
-import { appliedFilterStore } from '$features/FilterAndSortFonts';
+import { getAppliedFilterStore } from '$features/FilterAndSortFonts';
import {
render,
screen,
@@ -7,7 +7,7 @@ import Search from './Search.svelte';
describe('Search', () => {
beforeEach(() => {
- appliedFilterStore.queryValue = '';
+ getAppliedFilterStore().queryValue = '';
});
describe('Rendering', () => {
@@ -24,7 +24,7 @@ describe('Search', () => {
describe('Value binding', () => {
it('reflects appliedFilterStore.queryValue as initial value', () => {
- appliedFilterStore.queryValue = 'Inter';
+ getAppliedFilterStore().queryValue = 'Inter';
render(Search);
expect(screen.getByRole('textbox')).toHaveValue('Inter');
});
diff --git a/src/widgets/ComparisonView/ui/Sidebar/Sidebar.svelte b/src/widgets/ComparisonView/ui/Sidebar/Sidebar.svelte
index 895b4d5..bb270bc 100644
--- a/src/widgets/ComparisonView/ui/Sidebar/Sidebar.svelte
+++ b/src/widgets/ComparisonView/ui/Sidebar/Sidebar.svelte
@@ -14,7 +14,7 @@ import {
import type { Snippet } from 'svelte';
import {
type Side,
- comparisonStore,
+ getComparisonStore,
} from '../../model';
interface Props {
@@ -37,6 +37,9 @@ let {
controls,
class: className,
}: Props = $props();
+
+const comparisonStore = getComparisonStore();
+const side = $derived
(comparisonStore.side);
-
comparisonStore.side = 'A'}
class="flex-1 tracking-wide font-bold uppercase"
>
@@ -83,9 +85,9 @@ let {
comparisonStore.side = 'B'}
>
Right Font
@@ -93,14 +95,13 @@ let {
-
+
{#if main}
{@render main()}
{/if}
-
{#if controls}