fix(activity): cadence-aware suffixes on contribution log entries
This commit is contained in:
parent
10f8cab6e3
commit
e5f1e9f95e
3 changed files with 17 additions and 11 deletions
|
|
@ -27,10 +27,13 @@ const formatters = {
|
|||
text: `Changed circle from ${circleLabel(m.from)} to ${circleLabel(m.to)}`,
|
||||
icon: 'i-lucide-refresh-cw'
|
||||
}),
|
||||
contribution_changed: (m) => ({
|
||||
text: `Changed contribution from $${m.from}/mo to $${m.to}/mo`,
|
||||
icon: 'i-lucide-coins'
|
||||
}),
|
||||
contribution_changed: (m) => {
|
||||
const suffix = m.cadence === 'annual' ? '/yr' : '/mo'
|
||||
return {
|
||||
text: `Changed contribution from $${m.from}${suffix} to $${m.to}${suffix}`,
|
||||
icon: 'i-lucide-coins'
|
||||
}
|
||||
},
|
||||
email_changed: (m) => ({
|
||||
text: `Changed email address`,
|
||||
icon: 'i-lucide-mail'
|
||||
|
|
@ -41,10 +44,13 @@ const formatters = {
|
|||
: 'Updated profile',
|
||||
icon: 'i-lucide-user-pen'
|
||||
}),
|
||||
subscription_created: (m) => ({
|
||||
text: m.amount != null ? `Started $${m.amount}/mo subscription` : 'Started subscription',
|
||||
icon: 'i-lucide-credit-card'
|
||||
}),
|
||||
subscription_created: (m) => {
|
||||
const suffix = m.cadence === 'annual' ? '/yr' : '/mo'
|
||||
return {
|
||||
text: m.amount != null ? `Started $${m.amount}${suffix} subscription` : 'Started subscription',
|
||||
icon: 'i-lucide-credit-card'
|
||||
}
|
||||
},
|
||||
subscription_cancelled: () => ({
|
||||
text: 'Cancelled subscription',
|
||||
icon: 'i-lucide-credit-card'
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue