Seed: nonprofit template (15 files)
This commit is contained in:
@@ -30,7 +30,7 @@ export default function GetInvolvedPage() {
|
|||||||
try {
|
try {
|
||||||
const res = await donate({ plan: "Donation", amount: Math.round(dollars * 100), email });
|
const res = await donate({ plan: "Donation", amount: Math.round(dollars * 100), email });
|
||||||
if (res?.url && res.url !== "#") { window.location.href = res.url; return; }
|
if (res?.url && res.url !== "#") { window.location.href = res.url; return; }
|
||||||
toast.success(`Thank you for your generous $\${dollars} donation!`);
|
toast.success(`Thank you for your generous $${dollars} donation!`);
|
||||||
} catch {
|
} catch {
|
||||||
toast.error("Could not start checkout. Please try again.");
|
toast.error("Could not start checkout. Please try again.");
|
||||||
} finally {
|
} finally {
|
||||||
@@ -89,11 +89,11 @@ export default function GetInvolvedPage() {
|
|||||||
<form onSubmit={handleDonate} className="space-y-4">
|
<form onSubmit={handleDonate} className="space-y-4">
|
||||||
<div className="grid grid-cols-4 gap-2">
|
<div className="grid grid-cols-4 gap-2">
|
||||||
{amounts.map((a) => (
|
{amounts.map((a) => (
|
||||||
<Button key={a} type="button" variant={donationAmount === a ? "default" : "outline"} className={`rounded-full \${donationAmount === a ? "bg-emerald-600 hover:bg-emerald-700 text-white" : ""}`} onClick={() => { setDonationAmount(a); setCustomAmount(""); }}>
|
<Button key={a} type="button" variant={donationAmount === a ? "default" : "outline"} className={`rounded-full ${donationAmount === a ? "bg-emerald-600 hover:bg-emerald-700 text-white" : ""}`} onClick={() => { setDonationAmount(a); setCustomAmount(""); }}>
|
||||||
${a}
|
${a}
|
||||||
</Button>
|
</Button>
|
||||||
))}
|
))}
|
||||||
<Button type="button" variant={donationAmount === "custom" ? "default" : "outline"} className={`rounded-full text-xs \${donationAmount === "custom" ? "bg-emerald-600 hover:bg-emerald-700 text-white" : ""}`} onClick={() => setDonationAmount("custom")}>
|
<Button type="button" variant={donationAmount === "custom" ? "default" : "outline"} className={`rounded-full text-xs ${donationAmount === "custom" ? "bg-emerald-600 hover:bg-emerald-700 text-white" : ""}`} onClick={() => setDonationAmount("custom")}>
|
||||||
Other
|
Other
|
||||||
</Button>
|
</Button>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user