frontPanel/src/pages/ResultPage/ResultPage.tsx

15 lines
472 B
TypeScript
Raw Normal View History

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