From 3cb66447a1c1c59dbfcf4cc20a33fb5092ca70fc Mon Sep 17 00:00:00 2001 From: mortezaei Date: Tue, 18 Aug 2026 15:41:46 +0330 Subject: [PATCH] refactor: remove redundant form wrappers and name attributes from question components --- .../Componentes/question-birthplace.tsx | 1 - .../Componentes/question-number.tsx | 2 - src/components/Componentes/question-phone.tsx | 3 -- src/components/Componentes/question-text.tsx | 54 +++++++++---------- .../Componentes/question-textarea.tsx | 21 ++++---- 5 files changed, 33 insertions(+), 48 deletions(-) diff --git a/src/components/Componentes/question-birthplace.tsx b/src/components/Componentes/question-birthplace.tsx index 5ef9826..7265702 100644 --- a/src/components/Componentes/question-birthplace.tsx +++ b/src/components/Componentes/question-birthplace.tsx @@ -483,7 +483,6 @@ export function QuestionBirthplace({ -
e.preventDefault()}>
-
{showInvalidState ? ( Enter a valid phone number with country code. diff --git a/src/components/Componentes/question-text.tsx b/src/components/Componentes/question-text.tsx index 1b0f2f9..360dcd6 100644 --- a/src/components/Componentes/question-text.tsx +++ b/src/components/Componentes/question-text.tsx @@ -92,20 +92,17 @@ export default function QuestionText({ )} > -
e.preventDefault()}> - handleChange(e.target.value)} - onBlur={handleBlur} - placeholder={question.extras.placeHolder} - disabled={disabled || isMuted} - /> -
+ handleChange(e.target.value)} + onBlur={handleBlur} + placeholder={question.extras.placeHolder} + disabled={disabled || isMuted} + /> {showInvalidState ? ( {question.validation?.errorMessage || @@ -133,22 +130,19 @@ export default function QuestionText({ )} > -
e.preventDefault()}> - handleChange(e.target.value)} - onBlur={handleBlur} - placeholder={question.extras.placeHolder} - disabled={disabled || isMuted} - className={cn( - isMuted && "opacity-50 cursor-not-allowed bg-[#F5F5F5] border-[#E2E8F0]", - )} - /> -
+ handleChange(e.target.value)} + onBlur={handleBlur} + placeholder={question.extras.placeHolder} + disabled={disabled || isMuted} + className={cn( + isMuted && "opacity-50 cursor-not-allowed bg-[#F5F5F5] border-[#E2E8F0]", + )} + /> {isMarjaQuestion ? (