Merge branch 'dev' into 'staging'
Dev See merge request frontend/squzanswerer!57
This commit is contained in:
commit
cef32e2c18
@ -5,8 +5,8 @@ import QuizAnswerer from "./QuizAnswerer";
|
|||||||
import { QuizIdContext } from "./contexts/QuizIdContext";
|
import { QuizIdContext } from "./contexts/QuizIdContext";
|
||||||
import { RootContainerWidthContext } from "./contexts/RootContainerWidthContext";
|
import { RootContainerWidthContext } from "./contexts/RootContainerWidthContext";
|
||||||
|
|
||||||
// const defaultQuizId = "45ef7f9c-784d-4e58-badb-f6b337f08ba0"; // branching
|
const defaultQuizId = "9ed8d0e9-d355-4fc1-8b89-4f962e3efc52"; // branching
|
||||||
const defaultQuizId = "9ed8d0e9-d355-4fc1-8b89-4f962e3efc52"; //looooong header
|
//const defaultQuizId = "9ed8d0e9-d355-4fc1-8b89-4f962e3efc52"; //looooong header
|
||||||
// const defaultQuizId = "a9d31460-132a-4479-a3f0-90241498b6f9"; // linear
|
// const defaultQuizId = "a9d31460-132a-4479-a3f0-90241498b6f9"; // linear
|
||||||
|
|
||||||
export default function App() {
|
export default function App() {
|
||||||
|
@ -47,7 +47,7 @@ export async function getData(quizId: string): Promise<{
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
SESSIONS = headers["x-sessionkey"];
|
SESSIONS = headers["x-sessionkey"] ? headers["x-sessionkey"] : SESSIONS;
|
||||||
|
|
||||||
return { data, isRecentlyCompleted: false };
|
return { data, isRecentlyCompleted: false };
|
||||||
} catch (nativeError) {
|
} catch (nativeError) {
|
||||||
|
@ -106,8 +106,6 @@ export const ContactForm = ({ currentQuestion, onShowResult }: Props) => {
|
|||||||
return enqueueSnackbar("введена некорректная почта");
|
return enqueueSnackbar("введена некорректная почта");
|
||||||
}
|
}
|
||||||
|
|
||||||
//почта валидна
|
|
||||||
setFire(true);
|
|
||||||
|
|
||||||
if (fireOnce.current) {
|
if (fireOnce.current) {
|
||||||
if (
|
if (
|
||||||
@ -118,6 +116,8 @@ export const ContactForm = ({ currentQuestion, onShowResult }: Props) => {
|
|||||||
&& adress.length === 0
|
&& adress.length === 0
|
||||||
) return enqueueSnackbar("Пожалуйста, заполните поля");
|
) return enqueueSnackbar("Пожалуйста, заполните поля");
|
||||||
|
|
||||||
|
//почта валидна, хоть одно поле заполнено
|
||||||
|
setFire(true);
|
||||||
try {
|
try {
|
||||||
await inputHC();
|
await inputHC();
|
||||||
fireOnce.current = false;
|
fireOnce.current = false;
|
||||||
@ -276,11 +276,15 @@ export const ContactForm = ({ currentQuestion, onShowResult }: Props) => {
|
|||||||
</Typography>
|
</Typography>
|
||||||
</Box>
|
</Box>
|
||||||
<Box
|
<Box
|
||||||
|
component={Link}
|
||||||
|
target={"_blank"}
|
||||||
|
href={"https://quiz.pena.digital"}
|
||||||
sx={{
|
sx={{
|
||||||
display: "flex",
|
display: "flex",
|
||||||
alignItems: "center",
|
alignItems: "center",
|
||||||
mt: "20px",
|
mt: "20px",
|
||||||
gap: "15px",
|
gap: "15px",
|
||||||
|
textDecoration: "none",
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<NameplateLogo
|
<NameplateLogo
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import { Box, useTheme } from "@mui/material";
|
import {Box, Link, useTheme} from "@mui/material";
|
||||||
|
|
||||||
import { Footer } from "./Footer";
|
import { Footer } from "./Footer";
|
||||||
import { Date } from "./questions/Date";
|
import { Date } from "./questions/Date";
|
||||||
@ -58,9 +58,14 @@ console.log(settings)
|
|||||||
}}>
|
}}>
|
||||||
<QuestionByType question={currentQuestion} />
|
<QuestionByType question={currentQuestion} />
|
||||||
{quizThemes[settings.cfg.theme].isLight ? (
|
{quizThemes[settings.cfg.theme].isLight ? (
|
||||||
<NameplateLogoFQ style={{ fontSize: "34px", width: "200px", height: "auto" }} />
|
<Link target={"_blank"} href={"https://quiz.pena.digital"}>
|
||||||
|
<NameplateLogoFQ style={{ fontSize: "34px", width: "200px", height: "auto" }} />
|
||||||
|
</Link>
|
||||||
) : (
|
) : (
|
||||||
<NameplateLogoFQDark style={{ fontSize: "34px", width: "200px", height: "auto" }} />
|
<Link target={"_blank"} href={"https://quiz.pena.digital"}>
|
||||||
|
<NameplateLogoFQDark style={{ fontSize: "34px", width: "200px", height: "auto" }} />
|
||||||
|
</Link>
|
||||||
|
|
||||||
)}
|
)}
|
||||||
</Box>
|
</Box>
|
||||||
<Footer
|
<Footer
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import {
|
import {
|
||||||
Box,
|
Box,
|
||||||
Button,
|
Button, Link,
|
||||||
Typography,
|
Typography,
|
||||||
useTheme
|
useTheme
|
||||||
} from "@mui/material";
|
} from "@mui/material";
|
||||||
@ -123,11 +123,15 @@ export const ResultForm = ({ resultQuestion }: ResultFormProps) => {
|
|||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<Box
|
<Box
|
||||||
|
component={Link}
|
||||||
|
target={"_blank"}
|
||||||
|
href={"https://quiz.pena.digital"}
|
||||||
sx={{
|
sx={{
|
||||||
display: "flex",
|
display: "flex",
|
||||||
alignItems: "center",
|
alignItems: "center",
|
||||||
mt: "15px",
|
mt: "15px",
|
||||||
gap: "10px",
|
gap: "10px",
|
||||||
|
textDecoration: "none",
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<NameplateLogo
|
<NameplateLogo
|
||||||
|
@ -237,10 +237,14 @@ export const StartPageViewPublication = () => {
|
|||||||
</Box>
|
</Box>
|
||||||
|
|
||||||
<Box
|
<Box
|
||||||
|
component={Link}
|
||||||
|
target={"_blank"}
|
||||||
|
href={"https://quiz.pena.digital"}
|
||||||
sx={{
|
sx={{
|
||||||
display: "flex",
|
display: "flex",
|
||||||
alignItems: "center",
|
alignItems: "center",
|
||||||
gap: "15px"
|
gap: "15px",
|
||||||
|
textDecoration: "none"
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<NameplateLogo style={{ fontSize: "34px", color: settings.cfg.startpageType === "expanded" && !isMobile ? "#FFFFFF" : (quizThemes[settings.cfg.theme].isLight ? "#151515" : "#FFFFFF") }} />
|
<NameplateLogo style={{ fontSize: "34px", color: settings.cfg.startpageType === "expanded" && !isMobile ? "#FFFFFF" : (quizThemes[settings.cfg.theme].isLight ? "#151515" : "#FFFFFF") }} />
|
||||||
|
@ -10,6 +10,12 @@ export function useQuizData() {
|
|||||||
const quizId = useQuizId();
|
const quizId = useQuizId();
|
||||||
const { data } = useSWR(["quizData", quizId], params => getQuizData(params[1]), {
|
const { data } = useSWR(["quizData", quizId], params => getQuizData(params[1]), {
|
||||||
suspense: true,
|
suspense: true,
|
||||||
|
revalidateOnFocus: false,
|
||||||
|
revalidateOnMount:false,
|
||||||
|
revalidateOnReconnect: false,
|
||||||
|
refreshWhenOffline: false,
|
||||||
|
refreshWhenHidden: false,
|
||||||
|
refreshInterval: 0
|
||||||
});
|
});
|
||||||
|
|
||||||
return data;
|
return data;
|
||||||
|
Loading…
Reference in New Issue
Block a user