chore: remove auto capping surveys (#2395)

This commit is contained in:
Johannes
2024-04-05 11:45:01 +02:00
committed by GitHub
parent 9b27d6f84b
commit bd5f5032f8
2 changed files with 1 additions and 6 deletions

View File

@@ -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 {

View File

@@ -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);