refactor: extract shared country list and plan prices
This commit is contained in:
35
lib/countries.ts
Normal file
35
lib/countries.ts
Normal file
@@ -0,0 +1,35 @@
|
||||
export const COUNTRY_OPTIONS = [
|
||||
{ value: 'BE', label: 'Belgium' },
|
||||
{ value: 'NL', label: 'Netherlands' },
|
||||
{ value: 'DE', label: 'Germany' },
|
||||
{ value: 'FR', label: 'France' },
|
||||
{ value: 'AT', label: 'Austria' },
|
||||
{ value: 'IT', label: 'Italy' },
|
||||
{ value: 'ES', label: 'Spain' },
|
||||
{ value: 'PT', label: 'Portugal' },
|
||||
{ value: 'IE', label: 'Ireland' },
|
||||
{ value: 'LU', label: 'Luxembourg' },
|
||||
{ value: 'FI', label: 'Finland' },
|
||||
{ value: 'SE', label: 'Sweden' },
|
||||
{ value: 'DK', label: 'Denmark' },
|
||||
{ value: 'PL', label: 'Poland' },
|
||||
{ value: 'CZ', label: 'Czech Republic' },
|
||||
{ value: 'RO', label: 'Romania' },
|
||||
{ value: 'BG', label: 'Bulgaria' },
|
||||
{ value: 'HR', label: 'Croatia' },
|
||||
{ value: 'SI', label: 'Slovenia' },
|
||||
{ value: 'SK', label: 'Slovakia' },
|
||||
{ value: 'HU', label: 'Hungary' },
|
||||
{ value: 'LT', label: 'Lithuania' },
|
||||
{ value: 'LV', label: 'Latvia' },
|
||||
{ value: 'EE', label: 'Estonia' },
|
||||
{ value: 'MT', label: 'Malta' },
|
||||
{ value: 'CY', label: 'Cyprus' },
|
||||
{ value: 'GR', label: 'Greece' },
|
||||
{ value: 'US', label: 'United States' },
|
||||
{ value: 'GB', label: 'United Kingdom' },
|
||||
{ value: 'CH', label: 'Switzerland' },
|
||||
{ value: 'NO', label: 'Norway' },
|
||||
{ value: 'CA', label: 'Canada' },
|
||||
{ value: 'AU', label: 'Australia' },
|
||||
] as const
|
||||
11
lib/plans.ts
11
lib/plans.ts
@@ -79,3 +79,14 @@ export function formatRetentionMonths(months: number): string {
|
||||
if (Number.isInteger(years)) return years === 1 ? '1 year' : `${years} years`
|
||||
return `${months} months`
|
||||
}
|
||||
|
||||
/**
|
||||
* Monthly prices in EUR cents per plan and traffic tier.
|
||||
* IMPORTANT: Must stay in sync with backend GetSubscriptionAmount() in internal/billing/mollie.go
|
||||
* Yearly = monthly * 11 (1 month free)
|
||||
*/
|
||||
export const PLAN_PRICES: Record<string, Record<number, number>> = {
|
||||
solo: { 10000: 700, 50000: 1100, 100000: 1500, 250000: 2500, 500000: 3900, 1000000: 5500, 2500000: 7900, 5000000: 10300, 10000000: 13500 },
|
||||
team: { 10000: 1100, 50000: 1900, 100000: 2300, 250000: 3900, 500000: 5900, 1000000: 7900, 2500000: 11900, 5000000: 15500, 10000000: 19900 },
|
||||
business: { 10000: 1500, 50000: 2700, 100000: 3100, 250000: 5900, 500000: 7900, 1000000: 11100, 2500000: 16900, 5000000: 20700, 10000000: 26900 },
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user