Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release: Expansion of direct access to Gift Step in Donation form via query parameter #477

Merged
merged 4 commits into from
Dec 4, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
feat: allow gift query param for more project types
  • Loading branch information
mohitb35 committed Dec 4, 2024
commit b5f3e1238a450ac0b4191f5c4a0b502e5f65aded
6 changes: 5 additions & 1 deletion pages/index.tsx
Original file line number Diff line number Diff line change
@@ -456,7 +456,11 @@ export const getServerSideProps: GetServerSideProps = async (context) => {
}

// Set gift details if gift = true in the query params (only for tree projects)
if (context.query.gift === "true" && projectDetails?.purpose === "trees") {
if (
context.query.gift === "true" &&
projectDetails !== null &&
!NON_GIFTABLE_PROJECT_PURPOSES.includes(projectDetails.purpose)
) {
isGift = true;
giftDetails = {
type: "invitation",