Open source personal finance application
refactor: use WalletType from types instead of hardcoded union in demo
Ilya Komichev70a8abb5d441
diff --git a/app/components/demo/data.ts b/app/components/demo/data.tsindex 1710b9b8..c2567f0c 100644--- a/app/components/demo/data.ts+++ b/app/components/demo/data.ts@@ -1,34 +1,25 @@-import type { CategoryId } from '~/components/categories/types'-import type { WalletId } from '~/components/wallets/types'+import type { CategoryId, CategoryItem } from '~/components/categories/types'+import type { WalletId, WalletItem } from '~/components/wallets/types'type LocaleString = {en: stringru: string}-type DemoCategoryItem = {- color: string- icon: string+/** CategoryItem with localized name + optional order for demo sorting */+type DemoCategoryItem = Omit<CategoryItem, 'name'> & {name: LocaleStringorder?: number- parentId: string | 0- showInLastUsed: boolean- showInQuickSelector: boolean- updatedAt?: number}-type DemoWalletItem = {+/** WalletItem with localized name/desc, optional fields for compact demo data */+type DemoWalletItem = Partial<Omit<WalletItem, 'color' | 'currency' | 'desc' | 'name' | 'type'>> & {color: stringcreditLimit?: numbercurrency: stringdesc: LocaleString- isArchived?: boolean- isExcludeInTotal?: boolean- isWithdrawal?: booleanname: LocaleString- order?: number- type: 'cash' | 'cashless' | 'credit' | 'crypto' | 'debt' | 'deposit'- updatedAt?: number+ type: WalletItem['type']}export const data: {