mirror of
https://github.com/formbricks/formbricks.git
synced 2026-01-07 08:50:25 -06:00
fix: userError (#4703)
Co-authored-by: Dhruwang Jariwala <67850763+Dhruwang@users.noreply.github.com> Co-authored-by: Dhruwang <dhruwangjariwala18@gmail.com>
This commit is contained in:
@@ -6,8 +6,9 @@ import { ZUserEmail } from "@formbricks/types/user";
|
||||
|
||||
export const VerificationRequestedPage = async ({ searchParams }) => {
|
||||
const t = await getTranslations();
|
||||
const { token } = await searchParams;
|
||||
try {
|
||||
const email = getEmailFromEmailToken(searchParams.token);
|
||||
const email = getEmailFromEmailToken(token);
|
||||
const parsedEmail = ZUserEmail.safeParse(email);
|
||||
if (parsedEmail.success) {
|
||||
return (
|
||||
|
||||
@@ -4,10 +4,12 @@ import { getTranslations } from "next-intl/server";
|
||||
|
||||
export const VerifyPage = async ({ searchParams }) => {
|
||||
const t = await getTranslations();
|
||||
return searchParams && searchParams.token ? (
|
||||
const { token } = await searchParams;
|
||||
|
||||
return token ? (
|
||||
<FormWrapper>
|
||||
<p className="text-center">{t("auth.verify.verifying")}</p>
|
||||
<SignIn token={searchParams.token} />
|
||||
<SignIn token={token} />
|
||||
</FormWrapper>
|
||||
) : (
|
||||
<p className="text-center">{t("auth.verify.no_token_provided")}</p>
|
||||
|
||||
Reference in New Issue
Block a user