Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion apps/site/src/app/(main)/apply/Hacker.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export default async function Hacker({
}) {
return (
<ApplicationFlow
searchParams={searchParams}
prefaceAccepted={searchParams.prefaceAccepted}
applicationType="Hacker"
applicationURL="/apply"
>
Expand Down
2 changes: 1 addition & 1 deletion apps/site/src/app/(main)/mentor/Mentor.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export default async function Mentor({
}) {
return (
<ApplicationFlow
searchParams={searchParams}
prefaceAccepted={searchParams.prefaceAccepted}
applicationType="Mentor"
applicationURL="/mentor"
>
Expand Down
2 changes: 1 addition & 1 deletion apps/site/src/app/(main)/volunteer/Volunteer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export default async function Volunteer({
}) {
return (
<ApplicationFlow
searchParams={searchParams}
prefaceAccepted={searchParams.prefaceAccepted}
applicationType="Volunteer"
applicationURL="/volunteer"
>
Expand Down
8 changes: 3 additions & 5 deletions apps/site/src/lib/components/forms/shared/ApplicationFlow.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
Loading