mirror of
https://github.com/formbricks/formbricks.git
synced 2025-12-30 02:10:12 -06:00
fix: remove comments and console.log
This commit is contained in:
@@ -140,11 +140,9 @@ export default function LinkSurvey({ survey }: LinkSurveyProps) {
|
||||
|
||||
const submitResponse = async (data: { [x: string]: any }) => {
|
||||
setLoadingElement(true);
|
||||
// const questionIdx = survey.questions.findIndex((e) => e.id === currentQuestion?.id);
|
||||
const nextQuestionId = getNextQuestionId(data);
|
||||
|
||||
console.log(nextQuestionId);
|
||||
const finished = nextQuestionId === "end"; //|| questionIdx === survey.questions.length - 1;
|
||||
const finished = nextQuestionId === "end";
|
||||
// build response
|
||||
const responseRequest = {
|
||||
surveyId: survey.id,
|
||||
|
||||
@@ -164,10 +164,9 @@ export default function SurveyView({ config, survey, close, errorHandler }: Surv
|
||||
|
||||
const submitResponse = async (data: { [x: string]: any }) => {
|
||||
setLoadingElement(true);
|
||||
// const questionIdx = survey.questions.findIndex((e) => e.id === activeQuestionId);
|
||||
const nextQuestionId = getNextQuestion(data);
|
||||
|
||||
const finished = nextQuestionId === "end"; // || questionIdx === survey.questions.length - 1;
|
||||
const finished = nextQuestionId === "end";
|
||||
// build response
|
||||
const responseRequest = {
|
||||
surveyId: survey.id,
|
||||
@@ -193,7 +192,6 @@ export default function SurveyView({ config, survey, close, errorHandler }: Surv
|
||||
setLoadingElement(false);
|
||||
|
||||
if (!finished && nextQuestionId !== "end") {
|
||||
// setActiveQuestionId(survey.questions[questionIdx + 1].id);
|
||||
setActiveQuestionId(nextQuestionId);
|
||||
} else {
|
||||
setProgress(100);
|
||||
|
||||
Reference in New Issue
Block a user