при типе результата почта - стр резулта всё равно выводится после ФК

This commit is contained in:
Nastya 2023-12-31 02:27:57 +03:00
parent 00d4b0e34e
commit bfa8748dcb
3 changed files with 3 additions and 3 deletions

@ -137,7 +137,7 @@ export const ContactForm = ({
<Button
disabled={!ready}
variant="contained" onClick={() => {
if (quiz?.config.resultInfo.when === "after" && !checkEmptyData({ resultData: resultQuestion })) {
if ((quiz?.config.resultInfo.when === "after" || quiz?.config.resultInfo.when === "email") && !checkEmptyData({ resultData: resultQuestion })) {
setShowContactForm(false)
setShowResultForm(true)
}

@ -103,7 +103,7 @@ export const Footer = ({ setCurrentQuestion, question, setShowContactForm, setSh
console.log("до+заполнена = показать")
}
}
if (nextQuestion && quiz?.config.resultInfo.when === "after") {
if (nextQuestion && (quiz?.config.resultInfo.when === "after" || quiz?.config.resultInfo.when === "email")) {
if (isEmpty) {
setShowContactForm(true); //после+пустая
console.log("после+пустая")

@ -113,7 +113,7 @@ export const Question = ({ questions }: QuestionProps) => {
setShowResultForm={setShowResultForm}
/>
)}
{showResultForm && quiz?.config.resultInfo.when === "after" && (
{showResultForm && (quiz?.config.resultInfo.when === "after" || quiz?.config.resultInfo.when === "email") && (
<ResultForm
currentQuestion={currentQuestion}
showContactForm={showContactForm}