mirror of
https://github.com/formbricks/formbricks.git
synced 2026-05-04 04:41:38 -05:00
fix: prevent email verification checks in preview mode
This commit is contained in:
@@ -110,18 +110,18 @@ export const LinkSurvey = ({
|
||||
}, [searchParams, survey.hiddenFields.fieldIds]);
|
||||
|
||||
const getVerifiedEmail = useMemo<Record<string, string> | null>(() => {
|
||||
if (survey.isVerifyEmailEnabled && verifiedEmail) {
|
||||
if (survey.isVerifyEmailEnabled && verifiedEmail && !isPreview) {
|
||||
return { verifiedEmail: verifiedEmail };
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
}, [survey.isVerifyEmailEnabled, verifiedEmail]);
|
||||
}, [survey.isVerifyEmailEnabled, verifiedEmail, isPreview]);
|
||||
|
||||
if (hasFinishedSingleUseResponse) {
|
||||
return <SurveyLinkUsed singleUseMessage={survey.singleUse} project={project} />;
|
||||
}
|
||||
|
||||
if (survey.isVerifyEmailEnabled && emailVerificationStatus !== "verified") {
|
||||
if (survey.isVerifyEmailEnabled && emailVerificationStatus !== "verified" && !isPreview) {
|
||||
if (emailVerificationStatus === "fishy") {
|
||||
return (
|
||||
<VerifyEmail
|
||||
|
||||
@@ -74,7 +74,7 @@ export const renderSurvey = async ({
|
||||
let emailVerificationStatus = "";
|
||||
let verifiedEmail: string | undefined = undefined;
|
||||
|
||||
if (survey.isVerifyEmailEnabled) {
|
||||
if (survey.isVerifyEmailEnabled && !isPreview) {
|
||||
const token = searchParams.verify;
|
||||
|
||||
if (token) {
|
||||
|
||||
Reference in New Issue
Block a user