-
-
Notifications
You must be signed in to change notification settings - Fork 28
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor(website): update donation payment flow (#630)
- Loading branch information
Showing
19 changed files
with
468 additions
and
244 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
{ | ||
"amount-currency": "{{ amount, currency }}", | ||
"title": "Was ist dein durchschnittliches monatliches Einkommen?", | ||
"how-to-pay": "Wie möchtest du bezahlen?", | ||
"amount": "Betrag", | ||
"button-text": "Einen Unterschied machen", | ||
"donation-impact": { | ||
"monthly-contribution": "Dein monatlicher Beitrag:", | ||
"direct-payout": "Dein Beitrag wird direkt auf das Mobiltelefon der Social Income Empfänger:innen ausgezahlt.", | ||
"your-impact": "Dein Einfluss:", | ||
"0": "{{ amount, currency }} legt den Grundstein für eine bedeutende Sache. Es ermöglicht uns, einer Person in Not ein Social Income zu bieten.", | ||
"1": "{{ amount, currency }} deckt mehr als ein Drittel eines Social Incomes für eine bedürftige Person.", | ||
"2": "{{ amount, currency }} finanziert mehr als die Hälfte eines Social Incomes für eine Person.", | ||
"3": "Großartig! Dein monatlicher Beitrag von {{ amount, currency }} ermöglicht es mindestens einer bedürftigen Person ein vollständiges Social Income bereitzustellen.", | ||
"4": "{{ amount, currency }} ermöglicht ein Social Income für mehr als zwei bedürftige Personen.", | ||
"5": "Wunderbar! Dein Beitrag von {{ amount, currency }} finanziert ein Social Income für mehr als drei bedürftige Personen.", | ||
"6": "Dein Beitrag von {{ amount, currency }} sichert ein Social Income für mehr als vier bedürftige Personen.", | ||
"7": "Dein Beitrag von {{ amount, currency }} sichert ein Social Income für mehr als fünf bedürftige Personen.", | ||
"8": "Dein monatlicher Beitrag von {{ amount, currency }} ist außergewöhnlich, ebenso wie dein Einfluss." | ||
}, | ||
"donation-interval": { | ||
"1": { | ||
"title": "Monatlich", | ||
"text": "{{ amount, currency }} jeden Monat zahlen" | ||
}, | ||
"3": { | ||
"title": "Quartalsweise", | ||
"text": "{{ amount, currency }} alle 3 Monate zahlen" | ||
}, | ||
"12": { | ||
"title": "Jährlich", | ||
"text": "{{ amount, currency }} jedes Jahr zahlen" | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
{ | ||
"amount-currency": "{{ amount, currency }}", | ||
"title": "What's your average monthly income?", | ||
"how-to-pay": "How would you like to pay?", | ||
"amount": "Amount", | ||
"button-text": "Make a Difference", | ||
"donation-impact": { | ||
"monthly-contribution": "Your monthly contribution:", | ||
"direct-payout": "The people in need receive your contribution directly on their mobile phones.", | ||
"your-impact": "Your impact:", | ||
"0": "{{ amount, currency }} lays the groundwork for a significant cause. It enables us to provide a Social Income to an individual facing hardship.", | ||
"1": "{{ amount, currency }} pays for more than a third of a Social Income for one person in need.", | ||
"2": "{{ amount, currency }} funds more than half of someone’s Social Income.", | ||
"3": "Great! Your monthly contribution of {{ amount, currency }} will allow at least one person in need to receive a full Social Income.", | ||
"4": "{{ amount, currency }} provides a Social Income for more than two people in need.", | ||
"5": "Wonderful! Your contribution of {{ amount, currency }} funds a Social Income for more than three people in need.", | ||
"6": "Your contribution of {{ amount, currency }} sustains a Social Income for more than four people in need.", | ||
"7": "Your contribution of {{ amount, currency }} sustains a Social Income for more than five people in need.", | ||
"8": "Your monthly contribution of {{ amount, currency }} is extraordinary, as well as your impact." | ||
}, | ||
"donation-interval": { | ||
"1": { | ||
"title": "Monthly", | ||
"text": "Pay {{ amount, currency }} every month" | ||
}, | ||
"3": { | ||
"title": "Quarterly", | ||
"text": "Pay {{ amount, currency }} every 3 months" | ||
}, | ||
"12": { | ||
"title": "Yearly", | ||
"text": "Pay {{ amount, currency }} every year" | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
17 changes: 13 additions & 4 deletions
17
website/src/app/[lang]/[region]/(website)/me/payments/page.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,29 @@ | ||
import { DefaultPageProps } from '@/app/[lang]/[region]'; | ||
import { ContributionsTable } from '@/app/[lang]/[region]/(website)/me/payments/contributions-table'; | ||
import { PlusCircleIcon } from '@heroicons/react/24/outline'; | ||
import { Translator } from '@socialincome/shared/src/utils/i18n'; | ||
import { Button } from '@socialincome/ui'; | ||
import Link from 'next/link'; | ||
|
||
export default async function Page({ params }: DefaultPageProps) { | ||
const translator = await Translator.getInstance({ language: params.lang, namespaces: ['website-me'] }); | ||
export default async function Page({ params: { lang, region } }: DefaultPageProps) { | ||
const translator = await Translator.getInstance({ language: lang, namespaces: ['website-me'] }); | ||
|
||
return ( | ||
<div className="grid grid-cols-1 gap-4"> | ||
<div className="flex flex-col"> | ||
<ContributionsTable | ||
lang={lang} | ||
region={region} | ||
translations={{ | ||
date: translator.t('contributions.date'), | ||
amount: translator.t('contributions.amount'), | ||
source: translator.t('contributions.source'), | ||
}} | ||
{...params} | ||
/> | ||
<Link href={`/${lang}/${region}/donate/one-time`}> | ||
<Button Icon={PlusCircleIcon} variant="ghost" size="lg" className="w-full"> | ||
{translator.t('contributions.one-time-payment')} | ||
</Button> | ||
</Link> | ||
</div> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.