Merge branch 'new-api-version' into dev
This commit is contained in:
commit
dfc5d648f9
@ -19,7 +19,7 @@ type AddedQuizImagesResponse = {
|
||||
};
|
||||
|
||||
const API_URL = `${process.env.REACT_APP_DOMAIN}/squiz`;
|
||||
const IMAGES_URL = `${process.env.REACT_APP_DOMAIN}/squizstorer`;
|
||||
const IMAGES_URL = `${process.env.REACT_APP_DOMAIN}/squizstorer/v1.0.0`;
|
||||
|
||||
export const createQuiz = async (
|
||||
body?: Partial<CreateQuizRequest>,
|
||||
|
||||
@ -13,7 +13,7 @@ type SendFileResponse = {
|
||||
message: string;
|
||||
};
|
||||
|
||||
const API_URL = `${process.env.REACT_APP_DOMAIN}/heruvym`;
|
||||
const API_URL = `${process.env.REACT_APP_DOMAIN}/heruvym/v1.0.0`;
|
||||
|
||||
export const sendTicketMessage = async (
|
||||
ticketId: string,
|
||||
@ -67,7 +67,7 @@ export const sendFile = async (
|
||||
|
||||
const sendResponse = await makeRequest<FormData, SendFileResponse>({
|
||||
method: "POST",
|
||||
url: `${process.env.REACT_APP_DOMAIN}/heruvym/sendFiles`,
|
||||
url: `${API_URL}/sendFiles`,
|
||||
body,
|
||||
});
|
||||
|
||||
|
||||
@ -1,8 +1,4 @@
|
||||
import {
|
||||
Box,
|
||||
useMediaQuery,
|
||||
useTheme,
|
||||
} from "@mui/material";
|
||||
import { Box, useMediaQuery, useTheme } from "@mui/material";
|
||||
import { updateQuiz, setCurrentStep } from "@root/quizes/actions";
|
||||
import { useCurrentQuiz } from "@root/quizes/hooks";
|
||||
import { useQuizStore } from "@root/quizes/store";
|
||||
|
||||
@ -450,7 +450,7 @@ export const uploadQuestionImage = async (
|
||||
}
|
||||
|
||||
const imageId = values[0];
|
||||
const imageUrl = `https://storage.yandexcloud.net/squizimages/${quizQid}/${imageId}`;
|
||||
const imageUrl = `https://3c580be9-cf31f296-d055-49cf-b39e-30c7959dc17b.s3.timeweb.cloud/angesight/squizimages/${quizQid}/${imageId}`;
|
||||
|
||||
updateQuestion(questionId, (question) => {
|
||||
updateFn(question, imageUrl);
|
||||
|
||||
@ -305,7 +305,7 @@ export const uploadQuizImage = async (
|
||||
updateQuiz(quizId, (quiz) => {
|
||||
updateFn(
|
||||
quiz,
|
||||
`https://storage.yandexcloud.net/squizimages/${quiz.qid}/${imageId}`,
|
||||
`https://3c580be9-cf31f296-d055-49cf-b39e-30c7959dc17b.s3.timeweb.cloud/angesight/squizimages/${quiz.qid}/${imageId}`,
|
||||
);
|
||||
});
|
||||
};
|
||||
|
||||
@ -98,7 +98,7 @@ export default function ChatDocument({
|
||||
</svg>
|
||||
<Link
|
||||
download
|
||||
href={`https://storage.yandexcloud.net/pair/${file}`}
|
||||
href={`https://3c580be9-cf31f296-d055-49cf-b39e-30c7959dc17b.s3.timeweb.cloud/angesight/pair/${file}`}
|
||||
style={{
|
||||
color: "#7E2AEA",
|
||||
display: "flex",
|
||||
|
||||
@ -110,7 +110,7 @@ export default function ChatImage({
|
||||
height: "217px",
|
||||
width: "217px",
|
||||
}}
|
||||
src={`https://storage.yandexcloud.net/pair/${file}`}
|
||||
src={`https://3c580be9-cf31f296-d055-49cf-b39e-30c7959dc17b.s3.timeweb.cloud/angesight/pair/${file}`}
|
||||
/>
|
||||
</ButtonBase>
|
||||
</Box>
|
||||
|
||||
@ -12,7 +12,7 @@ export default function ChatImageNewWindow() {
|
||||
maxHeight: "100vh",
|
||||
maxWidth: "100vw",
|
||||
}}
|
||||
src={`https://storage.yandexcloud.net/pair/${srcImage}`}
|
||||
src={`https://3c580be9-cf31f296-d055-49cf-b39e-30c7959dc17b.s3.timeweb.cloud/angesight/pair/${srcImage}`}
|
||||
/>
|
||||
</>
|
||||
);
|
||||
|
||||
@ -113,7 +113,9 @@ export default function ChatImage({
|
||||
}}
|
||||
controls
|
||||
>
|
||||
<source src={`https://storage.yandexcloud.net/pair/${file}`} />
|
||||
<source
|
||||
src={`https://3c580be9-cf31f296-d055-49cf-b39e-30c7959dc17b.s3.timeweb.cloud/angesight/pair/${file}`}
|
||||
/>
|
||||
</Box>
|
||||
</Box>
|
||||
</Box>
|
||||
|
||||
@ -6,12 +6,18 @@ import {
|
||||
QuizType,
|
||||
} from "@model/quizSettings";
|
||||
|
||||
const ContactFormPage = lazy(() => import("../pages/ContactFormPage/ContactFormPage"));
|
||||
const ContactFormPage = lazy(
|
||||
() => import("../pages/ContactFormPage/ContactFormPage"),
|
||||
);
|
||||
const InstallQuiz = lazy(() => import("../pages/InstallQuiz/InstallQuiz"));
|
||||
const FormQuestionsPage = lazy(() => import("../pages/Questions/Form/FormQuestionsPage"));
|
||||
const FormQuestionsPage = lazy(
|
||||
() => import("../pages/Questions/Form/FormQuestionsPage"),
|
||||
);
|
||||
const QuestionsPage = lazy(() => import("../pages/Questions/QuestionsPage"));
|
||||
const ResultPage = lazy(() => import("../pages/ResultPage/ResultPage"));
|
||||
const StartPageSettings = lazy(() => import("../pages/startPage/StartPageSettings"));
|
||||
const StartPageSettings = lazy(
|
||||
() => import("../pages/startPage/StartPageSettings"),
|
||||
);
|
||||
const StepOne = lazy(() => import("../pages/startPage/stepOne"));
|
||||
const Steptwo = lazy(() => import("../pages/startPage/steptwo"));
|
||||
|
||||
@ -38,26 +44,56 @@ export default function SwitchStepPages({
|
||||
}: Props) {
|
||||
switch (activeStep) {
|
||||
case 0: {
|
||||
if (!quizType) return <LazyLoading><StepOne /></LazyLoading>;
|
||||
if (!quizStartPageType) return <LazyLoading><Steptwo /></LazyLoading>;
|
||||
return <LazyLoading><StartPageSettings /></LazyLoading>;
|
||||
if (!quizType)
|
||||
return (
|
||||
<LazyLoading>
|
||||
<StepOne />
|
||||
</LazyLoading>
|
||||
);
|
||||
if (!quizStartPageType)
|
||||
return (
|
||||
<LazyLoading>
|
||||
<Steptwo />
|
||||
</LazyLoading>
|
||||
);
|
||||
return (
|
||||
<LazyLoading>
|
||||
<StartPageSettings />
|
||||
</LazyLoading>
|
||||
);
|
||||
}
|
||||
case 1:
|
||||
return quizType === "form" ? (
|
||||
<LazyLoading><FormQuestionsPage /></LazyLoading>
|
||||
<LazyLoading>
|
||||
<FormQuestionsPage />
|
||||
</LazyLoading>
|
||||
) : (
|
||||
<LazyLoading><QuestionsPage
|
||||
openBranchingPage={openBranchingPage}
|
||||
setOpenBranchingPage={setOpenBranchingPage}
|
||||
widthMain={widthMain}
|
||||
/></LazyLoading>
|
||||
<LazyLoading>
|
||||
<QuestionsPage
|
||||
openBranchingPage={openBranchingPage}
|
||||
setOpenBranchingPage={setOpenBranchingPage}
|
||||
widthMain={widthMain}
|
||||
/>
|
||||
</LazyLoading>
|
||||
);
|
||||
case 2:
|
||||
return <LazyLoading><ResultPage /></LazyLoading>;
|
||||
return (
|
||||
<LazyLoading>
|
||||
<ResultPage />
|
||||
</LazyLoading>
|
||||
);
|
||||
case 3:
|
||||
return <LazyLoading><ContactFormPage /></LazyLoading>;
|
||||
return (
|
||||
<LazyLoading>
|
||||
<ContactFormPage />
|
||||
</LazyLoading>
|
||||
);
|
||||
case 4:
|
||||
return <LazyLoading><InstallQuiz /></LazyLoading>;
|
||||
return (
|
||||
<LazyLoading>
|
||||
<InstallQuiz />
|
||||
</LazyLoading>
|
||||
);
|
||||
default:
|
||||
throw new Error(`Invalid quiz setup step: ${activeStep}`);
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user