Skip to content

Commit

Permalink
feature(website): add button to donate via twint (#671)
Browse files Browse the repository at this point in the history
  • Loading branch information
mkue authored Dec 9, 2023
1 parent bf0e2d2 commit d60aff0
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 4 deletions.
3 changes: 2 additions & 1 deletion shared/locales/de/website-donate.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,8 @@
},
"one-time": {
"title": "Einmalige Spende",
"subtitle": "Unterstütze Social Income mit einem einmaligen Beitrag"
"subtitle": "Unterstütze Social Income mit einem einmaligen Beitrag",
"twint-button": "Du kannst uns auch via Twint unterstützen"
},
"success": {
"title": "Herzlichen Dank für deine Spende",
Expand Down
1 change: 1 addition & 0 deletions shared/locales/de/website-our-work.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
"header": "So funkioniert's",
"title-1": "Ein solidarischer Beitrag, von Mensch zu Mensch. ",
"title-2": "So einfach.",
"text": "Wir sind überzeugt, dass Menschen in Armut sich selber helfen können, wenn sie die Mittel dazu erhalten.",
"subtitle": "Mach einen Unterschied in weniger als 1 Minute.",
"item-1": "Individuelle Beiträge werden zu 100% an Empfänger:innen ausbezahlt",
"item-2": "Flexible Zahlungspläne. Modifiziere oder kündige jederzeit",
Expand Down
3 changes: 2 additions & 1 deletion shared/locales/en/website-donate.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,8 @@
},
"one-time": {
"title": "One-time Donation",
"subtitle": "Make a one-time donation to Social Income"
"subtitle": "Make a one-time donation to Social Income",
"twint-button": "You can also support us through Twint"
},
"success": {
"title": "Thank you for your contribution",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ export function Section2({ vimeoVideoId, translations }: Section2Props) {
{translations.videoButton}
</Typography>
</DialogTrigger>
<DialogContent className="max-w-screen-lg">
<DialogContent className="max-w-screen-lg overflow-hidden rounded p-0">
<VimeoVideo videoId={vimeoVideoId} videoOptions={{ autoplay: true }} />
</DialogContent>
</Dialog>
Expand Down
10 changes: 9 additions & 1 deletion website/src/app/[lang]/[region]/donate/one-time/page.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import { DefaultPageProps } from '@/app/[lang]/[region]';
import OneTimeDonationForm from '@/app/[lang]/[region]/donate/one-time/one-time-donation-form';
import { Translator } from '@socialincome/shared/src/utils/i18n';
import { BaseContainer, Typography } from '@socialincome/ui';
import { BaseContainer, Button, Typography } from '@socialincome/ui';
import Link from 'next/link';

export default async function Page({ params: { lang, region } }: DefaultPageProps) {
const translator = await Translator.getInstance({ language: lang, namespaces: 'website-donate' });
Expand All @@ -24,6 +25,13 @@ export default async function Page({ params: { lang, region } }: DefaultPageProp
}}
/>
</div>
{region === 'ch' && (
<Link href="https://donate.raisenow.io/cvzzr" target="_blank">
<Button size="lg" variant="link" className="mt-8">
{translator.t('one-time.twint-button')}
</Button>
</Link>
)}
</div>
</BaseContainer>
);
Expand Down

0 comments on commit d60aff0

Please sign in to comment.