mirror of
https://github.com/formbricks/formbricks.git
synced 2026-01-06 05:40:02 -06:00
chore: remove auto capping surveys (#2395)
This commit is contained in:
@@ -31,11 +31,9 @@ export default function SurveyStarter({
|
||||
const newSurveyFromTemplate = async (template: TTemplate) => {
|
||||
setIsCreateSurveyLoading(true);
|
||||
const surveyType = environment?.widgetSetupCompleted ? "web" : "link";
|
||||
const autoComplete = surveyType === "web" ? 50 : null;
|
||||
const augmentedTemplate: TSurveyInput = {
|
||||
...template.preset,
|
||||
type: surveyType,
|
||||
autoComplete: autoComplete || undefined,
|
||||
createdBy: user.id,
|
||||
};
|
||||
try {
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
"use client";
|
||||
|
||||
import { replacePresetPlaceholders } from "@/app/lib/templates";
|
||||
import { PlusCircleIcon, SparklesIcon } from "lucide-react";
|
||||
import { SplitIcon } from "lucide-react";
|
||||
import { PlusCircleIcon, SparklesIcon, SplitIcon } from "lucide-react";
|
||||
import { useRouter } from "next/navigation";
|
||||
import { useEffect, useState } from "react";
|
||||
|
||||
@@ -68,11 +67,9 @@ export default function TemplateList({
|
||||
const addSurvey = async (activeTemplate) => {
|
||||
setLoading(true);
|
||||
const surveyType = environment?.widgetSetupCompleted ? "web" : "link";
|
||||
const autoComplete = surveyType === "web" ? 50 : null;
|
||||
const augmentedTemplate: TSurveyInput = {
|
||||
...activeTemplate.preset,
|
||||
type: surveyType,
|
||||
autoComplete,
|
||||
createdBy: user.id,
|
||||
};
|
||||
const survey = await createSurveyAction(environmentId, augmentedTemplate);
|
||||
|
||||
Reference in New Issue
Block a user