diff --git a/app/pages/join.vue b/app/pages/join.vue
index 80bd80f..35c4035 100644
--- a/app/pages/join.vue
+++ b/app/pages/join.vue
@@ -121,14 +121,14 @@
Pay what you can
- $0 I need support right now
- - {{ cadence === 'annual' ? '$50/yr' : '$5/mo' }} I can contribute
+ - {{ formatTierAmount('5', '') }} I can contribute
-
- {{ cadence === 'annual' ? '$150/yr' : '$15/mo' }} I can sustain the community
+ {{ formatTierAmount('15', '') }} I can sustain the community
(suggested)
- - {{ cadence === 'annual' ? '$300/yr' : '$30/mo' }} I can support others too
+ - {{ formatTierAmount('30', '') }} I can support others too
-
- {{ cadence === 'annual' ? '$500/yr' : '$50/mo' }} I want to sponsor multiple
+ {{ formatTierAmount('50', '') }} I want to sponsor multiple
members
@@ -472,17 +472,25 @@ const contributionOptions = getContributionOptions();
// Minimal labels for the dropdown — reactive to cadence.
const contributionItems = computed(() => {
- const isAnnual = cadence.value === "annual";
return Object.values(CONTRIBUTION_TIERS).map((tier) => {
const base = tier.amount;
if (base === 0) return { value: tier.value, label: "$0" };
- const amt = isAnnual ? base * 10 : base;
- const suffix = isAnnual ? "/yr" : "/mo";
- const hint = tier.value === "15" && !isAnnual ? " (suggested)" : "";
+ const amt = getTierAmount(tier, cadence.value);
+ const suffix = cadence.value === "annual" ? "/yr" : "/mo";
+ const hint = tier.value === "15" && cadence.value !== "annual" ? " (suggested)" : "";
return { value: tier.value, label: `$${amt}${suffix}${hint}` };
});
});
+// Format tier amount for display in tier list
+const formatTierAmount = (value, label) => {
+ const tier = getContributionTierByValue(value);
+ if (!tier || tier.amount === 0) return "$0";
+ const amt = getTierAmount(tier, cadence.value);
+ const suffix = cadence.value === "annual" ? "/yr" : "/mo";
+ return `$${amt}${suffix}`;
+};
+
// Initialize composables
const {
initializeHelcimPay,