Refactor/reacrhitecture to fsd+ #49
@@ -34,7 +34,6 @@ const fontB = $derived(comparisonStore.fontB);
|
|||||||
let slot = $state<0 | 1>(0);
|
let slot = $state<0 | 1>(0);
|
||||||
let slotFonts = $state<[string, string]>(['', '']);
|
let slotFonts = $state<[string, string]>(['', '']);
|
||||||
|
|
||||||
const displayChar = $derived(char === ' ' ? ' ' : char);
|
|
||||||
const targetFont = $derived(isPast ? fontA?.name ?? '' : fontB?.name ?? '');
|
const targetFont = $derived(isPast ? fontA?.name ?? '' : fontB?.name ?? '');
|
||||||
|
|
||||||
$effect(() => {
|
$effect(() => {
|
||||||
@@ -63,7 +62,7 @@ $effect(() => {
|
|||||||
style:position={slot === s ? 'relative' : 'absolute'}
|
style:position={slot === s ? 'relative' : 'absolute'}
|
||||||
aria-hidden={slot !== s ? true : undefined}
|
aria-hidden={slot !== s ? true : undefined}
|
||||||
>
|
>
|
||||||
{displayChar}
|
{char}
|
||||||
</span>
|
</span>
|
||||||
{/each}
|
{/each}
|
||||||
</span>
|
</span>
|
||||||
|
|||||||
Reference in New Issue
Block a user