From 57812ddb19241fc3957b11e96a83e8864d30a3b8 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 | 1 + 1 file changed, 1 insertion(+) diff --git a/pages/index.tsx b/pages/index.tsx index 2726a1f1..166af037 100644 --- a/pages/index.tsx +++ b/pages/index.tsx @@ -457,6 +457,7 @@ export const getServerSideProps: GetServerSideProps = async (context) => { // Set gift details if gift = true in the query params (only for tree projects) if ( + giftDetails?.type !== "direct" && context.query.gift === "true" && projectDetails !== null && !NON_GIFTABLE_PROJECT_PURPOSES.includes(projectDetails.purpose)