diff --git a/lib/api/quizRelase.ts b/lib/api/quizRelase.ts index eab13fe..c576894 100644 --- a/lib/api/quizRelase.ts +++ b/lib/api/quizRelase.ts @@ -78,7 +78,7 @@ export async function getData(quizId: string): Promise<{ error?: AxiosError; }> { try { - const { data, headers } = await axios(domain + `/answer/settings`, { + const { data, headers } = await axios(domain + `/answer/settings${window.location.search}`, { method: "POST", headers: { "X-Sessionkey": SESSIONS, @@ -160,7 +160,7 @@ export function sendAnswer({ questionId, body, qid, preview }: SendAnswerProps) formData.append("qid", qid); return publicationMakeRequest({ - url: domain + `/answer/answer`, + url: domain + `/answer/v1.0.0/answer`, body: formData, method: "POST", }); @@ -199,7 +199,7 @@ export function sendFile({ questionId, body, qid }: SendFileParams) { formData.append("qid", qid); return publicationMakeRequest({ - url: domain + `/answer/answer`, + url: domain + `/answer/v1.0.0/answer`, body: formData, method: "POST", }); @@ -242,7 +242,7 @@ export function sendFC({ questionId, body, qid, preview }: SendFCParams) { formData.append("qid", qid); return publicationMakeRequest({ - url: domain + `/answer/answer`, + url: domain + `/answer/v1.0.0/answer`, body: formData, method: "POST", }); diff --git a/lib/components/ViewPublicationPage/ContactForm/ContactForm.tsx b/lib/components/ViewPublicationPage/ContactForm/ContactForm.tsx index 6b449ba..f55100c 100644 --- a/lib/components/ViewPublicationPage/ContactForm/ContactForm.tsx +++ b/lib/components/ViewPublicationPage/ContactForm/ContactForm.tsx @@ -310,7 +310,7 @@ export const ContactForm = ({ currentQuestion, onShowResult }: Props) => { target={"_blank"} href={`https://${ window.location.hostname.includes("s") ? "s" : "" - }quiz.pena.digital/squiz/quiz/logo?q=${quizId}`} + }quiz.pena.digital/answer/v1.0.0/logo?q=${quizId}`} sx={{ display: "flex", alignItems: "center", diff --git a/lib/components/ViewPublicationPage/Question.tsx b/lib/components/ViewPublicationPage/Question.tsx index b9a1747..f63f1b3 100644 --- a/lib/components/ViewPublicationPage/Question.tsx +++ b/lib/components/ViewPublicationPage/Question.tsx @@ -40,7 +40,7 @@ export const Question = ({ questionSelect, }: Props) => { const theme = useTheme(); - const { settings, show_badge } = useQuizSettings(); + const { settings, show_badge, quizId } = useQuizSettings(); return ( { useEffect(() => { vkMetrics.resultIdShown(resultQuestion.id); yandexMetrics.resultIdShown(resultQuestion.id); - }, []); + }, [resultQuestion.id, vkMetrics, yandexMetrics]); return ( { target={"_blank"} href={`https://${ window.location.hostname.includes("s") ? "s" : "" - }quiz.pena.digital/squiz/quiz/logo?q=${quizId}`} + }quiz.pena.digital/answer/v1.0.0/logo?q=${quizId}`} sx={{ display: "flex", alignItems: "center", @@ -229,19 +229,21 @@ export const ResultForm = ({ resultQuestion }: ResultFormProps) => { bottom: 0, }} > - {settings.cfg.resultInfo.showResultForm === "before" && !settings.cfg.score && ( - - )} + {settings.cfg.resultInfo.showResultForm === "before" && + settings.cfg.showfc !== false && + !settings.cfg.score && ( + + )} {settings.cfg.resultInfo.showResultForm === "after" && resultQuestion.content.redirect && (