diff --git a/lib/components/ViewPublicationPage/Footer.tsx b/lib/components/ViewPublicationPage/Footer.tsx
index f21c9cd..fa5b6ac 100644
--- a/lib/components/ViewPublicationPage/Footer.tsx
+++ b/lib/components/ViewPublicationPage/Footer.tsx
@@ -6,93 +6,53 @@ import { useQuizData } from "@contexts/QuizDataContext";
import Stepper from "@ui_kit/Stepper";
type FooterProps = {
- stepNumber: number | null;
- nextButton: ReactNode;
- prevButton: ReactNode;
+ stepNumber: number | null;
+ nextButton: ReactNode;
+ prevButton: ReactNode;
};
export const Footer = ({ stepNumber, nextButton, prevButton }: FooterProps) => {
- const theme = useTheme();
- const { questions, settings } = useQuizData();
- const questionsAmount = questions.filter(
- ({ type }) => type !== "result"
- ).length;
- if (stepNumber === null) stepNumber = -1
-console.log("stepNumber ", stepNumber)
- return (
-
-
- {/*{mode[settings.cfg.theme] ? (*/}
- {/* */}
- {/*):(*/}
- {/* */}
- {/*)}*/}
- {
- questions.every(({ content }) => content.rule.parentId !== "root") !== null // null when branching enabled
- &&
- stepNumber !== null && (
-
-
- Вопрос {stepNumber} из {questionsAmount}
-
-
-
- )}
+ const theme = useTheme();
+ const { questions, settings } = useQuizData();
+ const questionsAmount = questions.filter(
+ ({ type }) => type !== "result"
+ ).length;
+ return (
- {/* Шаг
-
- {stepNumber} */}
- {/* */}
- {/* Из
-
- {questions.length}
- */}
+ >
+
+ {stepNumber !== null && (
+
+
+ Вопрос {stepNumber} из {questionsAmount}
+
+
+
+ )}
+ {prevButton}
+ {nextButton}
+
- {prevButton}
- {nextButton}
-
-
- );
+ );
};
diff --git a/lib/components/ViewPublicationPage/Question.tsx b/lib/components/ViewPublicationPage/Question.tsx
index 47f228b..f2ae2ad 100644
--- a/lib/components/ViewPublicationPage/Question.tsx
+++ b/lib/components/ViewPublicationPage/Question.tsx
@@ -21,14 +21,15 @@ import { NameplateLogoFQDark } from "@icons/NameplateLogoFQDark";
import { notReachable } from "@utils/notReachable";
import { quizThemes } from "@utils/themes/Publication/themePublication";
-import type { ReactNode } from "react";
import { DESIGN_LIST } from "@/utils/designList";
+import type { ReactNode } from "react";
type Props = {
currentQuestion: RealTypedQuizQuestion;
currentQuestionStepNumber: number | null;
nextButton: ReactNode;
prevButton: ReactNode;
+ questionSelect: ReactNode;
};
export const Question = ({
@@ -36,6 +37,7 @@ export const Question = ({
currentQuestionStepNumber,
nextButton,
prevButton,
+ questionSelect,
}: Props) => {
const theme = useTheme();
const { settings, show_badge } = useQuizData();
@@ -118,6 +120,7 @@ export const Question = ({
)}
+ {questionSelect}