15 lines
472 B
TypeScript
15 lines
472 B
TypeScript
import { useQuestionsStore } from "@root/questions/store";
|
|
import { FirstEntry } from "./FirstEntry"
|
|
import { ResultSettings } from "./ResultSettings"
|
|
|
|
export const ResultPage = () => {
|
|
const { questions } = useQuestionsStore();
|
|
//ищём хотя бы один result
|
|
const haveResult = questions.some((question) => question.type === "result")
|
|
return (
|
|
haveResult ?
|
|
<ResultSettings />
|
|
:
|
|
<FirstEntry />
|
|
);
|
|
} |