Skip to content

Commit b5f3e12

Browse files
committed
feat: allow gift query param for more project types
1 parent 0f124bf commit b5f3e12

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

pages/index.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -456,7 +456,11 @@ export const getServerSideProps: GetServerSideProps = async (context) => {
456456
}
457457

458458
// Set gift details if gift = true in the query params (only for tree projects)
459-
if (context.query.gift === "true" && projectDetails?.purpose === "trees") {
459+
if (
460+
context.query.gift === "true" &&
461+
projectDetails !== null &&
462+
!NON_GIFTABLE_PROJECT_PURPOSES.includes(projectDetails.purpose)
463+
) {
460464
isGift = true;
461465
giftDetails = {
462466
type: "invitation",

0 commit comments

Comments
 (0)