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 />
    );
}