Skip to content

Commit

Permalink
fix: prevent use of gift=true query param if direct gift is set
Browse files Browse the repository at this point in the history
  • Loading branch information
mohitb35 committed Dec 4, 2024
1 parent fc5c245 commit 68c040a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pages/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -455,8 +455,9 @@ export const getServerSideProps: GetServerSideProps = async (context) => {
}
}

// Set gift details if gift = true in the query params (only for tree projects)
// Set gift details if gift = true in the query params
if (
giftDetails?.type !== "direct" &&
context.query.gift === "true" &&
projectDetails !== null &&
!NON_GIFTABLE_PROJECT_PURPOSES.includes(projectDetails.purpose)
Expand Down

0 comments on commit 68c040a

Please sign in to comment.