Skip to content

Commit

Permalink
feat: add more currencies
Browse files Browse the repository at this point in the history
closes #39
  • Loading branch information
simonwep committed May 20, 2024
1 parent 3765a8a commit 1583d8b
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/store/state/migrator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ export const migrateApplicationState = createMigrator<DataState, Versions>({
to: 3,
migrate: (from) => ({
locale: initialLocale,
currency: 'gbp',
currency: 'GBP',
years: from.years
})
})
Expand Down
45 changes: 43 additions & 2 deletions src/store/state/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,50 @@ import { AvailableLocale } from '@i18n/index';

export type BudgetValues = number[];

export const availableCurrencies = ['gbp', 'eur', 'usd'];
export const availableCurrencies = [
'USD',
'EUR',
'JPY',
'GBP',
'AUD',
'CAD',
'CHF',
'CNY',
'SEK',
'NZD',
'MXN',
'SGD',
'HKD',
'NOK',
'KRW',
'TRY',
'INR',
'RUB',
'BRL',
'ZAR'
];

export type AvailableCurrency = 'gbp' | 'eur' | 'usd';
export type AvailableCurrency =
| 'USD'
| 'EUR'
| 'JPY'
| 'GBP'
| 'AUD'
| 'CAD'
| 'CHF'
| 'CNY'
| 'SEK'
| 'NZD'
| 'MXN'
| 'SGD'
| 'HKD'
| 'NOK'
| 'KRW'
| 'TRY'
| 'INR'
| 'RUB'
| 'BRL'
| 'ZAR';

export interface Budget {
id: string;
Expand Down

0 comments on commit 1583d8b

Please sign in to comment.