From 7d5bc54325308077b93011330cce482dd9e880ef Mon Sep 17 00:00:00 2001 From: Nastya Date: Sat, 31 Aug 2024 04:57:26 +0300 Subject: [PATCH] =?UTF-8?q?=D0=BE=D0=B1=D1=80=D0=B0=D0=B1=D0=BE=D1=82?= =?UTF-8?q?=D0=BA=D0=B0=20=D0=BE=D1=88=D0=B8=D0=B1=D0=BA=D0=B8=20=D0=BF?= =?UTF-8?q?=D1=83=D1=81=D1=82=D0=BE=D0=B3=D0=BE=20=D0=BA=D0=B2=D0=B8=D0=B7?= =?UTF-8?q?=D0=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/components/QuizAnswerer.tsx | 5 +++-- lib/components/ViewPublicationPage/ApologyPage.tsx | 1 + 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/components/QuizAnswerer.tsx b/lib/components/QuizAnswerer.tsx index 4328b76..83e20c3 100644 --- a/lib/components/QuizAnswerer.tsx +++ b/lib/components/QuizAnswerer.tsx @@ -75,11 +75,12 @@ function QuizAnswererInner({ if (isLoading) return ; if (error) return ; // if (!data) return ; - quizSettings ??= data; if (!quizSettings) return ; - if (quizSettings.questions.length === 0) return ; + if (quizSettings.questions.length === 1 && quizSettings?.settings.cfg.noStartPage) + return ; + // if (quizSettings.questions.length === 1) return ; if (!quizId) return ; const quizContainer = ( diff --git a/lib/components/ViewPublicationPage/ApologyPage.tsx b/lib/components/ViewPublicationPage/ApologyPage.tsx index 8633053..52d7cc1 100644 --- a/lib/components/ViewPublicationPage/ApologyPage.tsx +++ b/lib/components/ViewPublicationPage/ApologyPage.tsx @@ -8,6 +8,7 @@ export const ApologyPage = ({ error }: Props) => { if (error.response?.data === "quiz is inactive") message = "Квиз не активирован"; if (error.message === "No questions found") message = "Нет созданных вопросов"; + if (error.message === "Quiz is empty") message = "Квиз пуст"; if (error.message === "Quiz already completed") message = "Вы уже прошли этот опрос"; if (error.message === "No quiz id") message = "Отсутствует id квиза"; if (error.message === "Quiz data is null") message = "Не были переданы параметры квиза";