refactor: migrate all callers from unifiedFontStore to fontStore
This commit is contained in:
@@ -16,7 +16,7 @@
|
||||
import {
|
||||
type UnifiedFont,
|
||||
fetchFontsByIds,
|
||||
unifiedFontStore,
|
||||
fontStore,
|
||||
} from '$entities/Font';
|
||||
import {
|
||||
DEFAULT_TYPOGRAPHY_CONTROLS_DATA,
|
||||
@@ -85,7 +85,7 @@ export class ComparisonStore {
|
||||
}
|
||||
|
||||
// Check if fonts are available to set as defaults
|
||||
const fonts = unifiedFontStore.fonts;
|
||||
const fonts = fontStore.fonts;
|
||||
if (fonts.length >= 2) {
|
||||
// Only set if we really have nothing (fallback)
|
||||
if (!this.#fontA) this.#fontA = fonts[0];
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
Provides a search input and filtration for fonts
|
||||
-->
|
||||
<script lang="ts">
|
||||
import { unifiedFontStore } from '$entities/Font';
|
||||
import { fontStore } from '$entities/Font';
|
||||
import {
|
||||
FilterControls,
|
||||
Filters,
|
||||
@@ -36,7 +36,7 @@ let { showFilters = $bindable(true) }: Props = $props();
|
||||
|
||||
$effect(() => {
|
||||
const params = mapManagerToParams(filterManager);
|
||||
untrack(() => unifiedFontStore.setParams(params));
|
||||
untrack(() => fontStore.setParams(params));
|
||||
});
|
||||
|
||||
const transform = new Tween(
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
-->
|
||||
<script lang="ts">
|
||||
import { NavigationWrapper } from '$entities/Breadcrumb';
|
||||
import { unifiedFontStore } from '$entities/Font';
|
||||
import { fontStore } from '$entities/Font';
|
||||
import type { ResponsiveManager } from '$shared/lib';
|
||||
import { cn } from '$shared/shadcn/utils/shadcn-utils';
|
||||
import {
|
||||
@@ -36,7 +36,7 @@ const responsive = getContext<ResponsiveManager>('responsive');
|
||||
id="sample_set"
|
||||
title="Sample Set"
|
||||
headerTitle="visual_output"
|
||||
headerSubtitle="items_total: {unifiedFontStore.pagination.total ?? 0}"
|
||||
headerSubtitle="items_total: {fontStore.pagination.total ?? 0}"
|
||||
headerAction={registerAction}
|
||||
>
|
||||
{#snippet headerContent()}
|
||||
|
||||
Reference in New Issue
Block a user