mirror of
https://github.com/fosrl/pangolin.git
synced 2026-02-18 19:06:38 +00:00
add send email verification opt out
This commit is contained in:
@@ -15,6 +15,7 @@ export default async function Page(props: {
|
||||
redirect: string | undefined;
|
||||
email: string | undefined;
|
||||
fromSmartLogin: string | undefined;
|
||||
skipVerificationEmail: string | undefined;
|
||||
}>;
|
||||
}) {
|
||||
const searchParams = await props.searchParams;
|
||||
@@ -75,6 +76,10 @@ export default async function Page(props: {
|
||||
inviteId={inviteId}
|
||||
emailParam={searchParams.email}
|
||||
fromSmartLogin={searchParams.fromSmartLogin === "true"}
|
||||
skipVerificationEmail={
|
||||
searchParams.skipVerificationEmail === "true" ||
|
||||
searchParams.skipVerificationEmail === "1"
|
||||
}
|
||||
/>
|
||||
|
||||
<p className="text-center text-muted-foreground mt-4">
|
||||
|
||||
@@ -72,6 +72,7 @@ type SignupFormProps = {
|
||||
inviteToken?: string;
|
||||
emailParam?: string;
|
||||
fromSmartLogin?: boolean;
|
||||
skipVerificationEmail?: boolean;
|
||||
};
|
||||
|
||||
const formSchema = z
|
||||
@@ -103,7 +104,8 @@ export default function SignupForm({
|
||||
inviteId,
|
||||
inviteToken,
|
||||
emailParam,
|
||||
fromSmartLogin = false
|
||||
fromSmartLogin = false,
|
||||
skipVerificationEmail = false
|
||||
}: SignupFormProps) {
|
||||
const router = useRouter();
|
||||
const { env } = useEnvContext();
|
||||
@@ -147,7 +149,8 @@ export default function SignupForm({
|
||||
inviteToken,
|
||||
termsAcceptedTimestamp: termsAgreedAt,
|
||||
marketingEmailConsent:
|
||||
build === "saas" ? marketingEmailConsent : undefined
|
||||
build === "saas" ? marketingEmailConsent : undefined,
|
||||
skipVerificationEmail: skipVerificationEmail || undefined
|
||||
})
|
||||
.catch((e) => {
|
||||
console.error(e);
|
||||
|
||||
Reference in New Issue
Block a user