53 lines
1.2 KiB
TypeScript
53 lines
1.2 KiB
TypeScript
import { useNavigate } from "react-router-dom";
|
|
import { useUpdateStep } from "@/components/ChatsPath/hooks/useUpdateStep";
|
|
import routes from "@/routes";
|
|
import { IAnswer } from "@/components/ChatsPath/data";
|
|
import Answers from "@/components/ChatsPath/components/Answers";
|
|
import { useTranslations } from "@/hooks/translations";
|
|
import { ELocalesPlacement } from "@/locales";
|
|
|
|
function NeedGuidance() {
|
|
const { translate } = useTranslations(ELocalesPlacement.Chats);
|
|
useUpdateStep(17);
|
|
const navigate = useNavigate();
|
|
|
|
const handleNext = () => {
|
|
navigate(routes.client.chatsQuizDecisionGuidance());
|
|
};
|
|
|
|
const answers: IAnswer[] = [
|
|
{
|
|
id: 1,
|
|
value: "no",
|
|
name: translate("no"),
|
|
questionId: "needGuidance",
|
|
onClick: handleNext,
|
|
},
|
|
{
|
|
id: 2,
|
|
value: "yes",
|
|
name: translate("yes"),
|
|
questionId: "needGuidance",
|
|
onClick: handleNext,
|
|
},
|
|
{
|
|
id: 3,
|
|
value: "not_sure",
|
|
name: translate("not_sure"),
|
|
questionId: "needGuidance",
|
|
onClick: handleNext,
|
|
},
|
|
];
|
|
|
|
return (
|
|
<>
|
|
<h2 className={`chats-answers-title`}>
|
|
{translate("/quiz/needGuidance.title")}
|
|
</h2>
|
|
<Answers answers={answers} />
|
|
</>
|
|
);
|
|
}
|
|
|
|
export default NeedGuidance;
|