From 15b9cb889593a9dce84cf5f52b260b1a99b2cb1e Mon Sep 17 00:00:00 2001 From: cyriljoby Date: Mon, 13 Jan 2025 00:05:43 -0800 Subject: [PATCH 1/2] simplified ApplicationFlow's searcParam to only have prefaceAccepted --- apps/site/src/app/(main)/apply/Hacker.tsx | 2 +- apps/site/src/app/(main)/volunteer/Volunteer.tsx | 2 +- .../src/lib/components/forms/shared/ApplicationFlow.tsx | 8 +++----- 3 files changed, 5 insertions(+), 7 deletions(-) diff --git a/apps/site/src/app/(main)/apply/Hacker.tsx b/apps/site/src/app/(main)/apply/Hacker.tsx index 3778b375..d7bb09d0 100644 --- a/apps/site/src/app/(main)/apply/Hacker.tsx +++ b/apps/site/src/app/(main)/apply/Hacker.tsx @@ -12,7 +12,7 @@ export default async function Hacker({ }) { return ( diff --git a/apps/site/src/app/(main)/volunteer/Volunteer.tsx b/apps/site/src/app/(main)/volunteer/Volunteer.tsx index db2d69ab..4a5d0be0 100644 --- a/apps/site/src/app/(main)/volunteer/Volunteer.tsx +++ b/apps/site/src/app/(main)/volunteer/Volunteer.tsx @@ -12,7 +12,7 @@ export default async function Volunteer({ }) { return ( diff --git a/apps/site/src/lib/components/forms/shared/ApplicationFlow.tsx b/apps/site/src/lib/components/forms/shared/ApplicationFlow.tsx index ba5a2d67..ea3be0eb 100644 --- a/apps/site/src/lib/components/forms/shared/ApplicationFlow.tsx +++ b/apps/site/src/lib/components/forms/shared/ApplicationFlow.tsx @@ -12,20 +12,18 @@ import getUserIdentity from "@/lib/utils/getUserIdentity"; export const revalidate = 60; interface ApplicationFlowProps { - searchParams: { - prefaceAccepted?: string; - }; + prefaceAccepted?: string; applicationType: "Hacker" | "Mentor" | "Volunteer"; applicationURL: "/apply" | "/mentor" | "/volunteer"; } export default async function ApplicationFlow({ - searchParams, + prefaceAccepted, applicationType, applicationURL, children, }: ApplicationFlowProps & PropsWithChildren) { - const hasAcceptedQueryParam = searchParams.prefaceAccepted === "true"; + const hasAcceptedQueryParam = prefaceAccepted === "true"; const identity = await getUserIdentity(); if (identity.status !== null) { From 008f59dddffca84bcdf44a928e5fd5322f467ffd Mon Sep 17 00:00:00 2001 From: cyriljoby Date: Mon, 13 Jan 2025 19:37:14 -0800 Subject: [PATCH 2/2] fixed old ref to searchParams --- apps/site/src/app/(main)/mentor/Mentor.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/site/src/app/(main)/mentor/Mentor.tsx b/apps/site/src/app/(main)/mentor/Mentor.tsx index 1421983e..e6232215 100644 --- a/apps/site/src/app/(main)/mentor/Mentor.tsx +++ b/apps/site/src/app/(main)/mentor/Mentor.tsx @@ -12,7 +12,7 @@ export default async function Mentor({ }) { return (