2023-12-07 21:30:26 +00:00
|
|
|
import { useQuestionsStore } from "@root/questions/store";
|
2023-12-07 22:56:31 +00:00
|
|
|
import { FirstEntry } from "./FirstEntry"
|
|
|
|
import { ResultSettings } from "./ResultSettings"
|
2023-12-07 21:30:26 +00:00
|
|
|
|
2023-12-07 22:56:31 +00:00
|
|
|
export const ResultPage = () => {
|
2023-12-07 21:30:26 +00:00
|
|
|
const { questions } = useQuestionsStore();
|
|
|
|
//ищём хотя бы один result
|
2023-12-07 22:56:31 +00:00
|
|
|
const haveResult = questions.some((question) => question.type === "result")
|
2023-12-07 21:30:26 +00:00
|
|
|
return (
|
2023-12-07 22:56:31 +00:00
|
|
|
haveResult ?
|
|
|
|
<ResultSettings />
|
|
|
|
:
|
|
|
|
<FirstEntry />
|
2023-12-07 21:30:26 +00:00
|
|
|
);
|
|
|
|
}
|