From 68c040a4813f62f82930ae75b7d2e3b1e474c9d9 Mon Sep 17 00:00:00 2001 From: mohitb35 <44917347+mohitb35@users.noreply.github.com> Date: Wed, 4 Dec 2024 12:50:54 +0530 Subject: [PATCH] fix: prevent use of `gift=true` query param if direct gift is set --- pages/index.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pages/index.tsx b/pages/index.tsx index 2726a1f1..90bbed4d 100644 --- a/pages/index.tsx +++ b/pages/index.tsx @@ -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)