Merge branch 'dev' into 'staging'

Dev

See merge request frontend/squzanswerer!57
This commit is contained in:
Nastya 2024-02-11 23:35:38 +00:00
commit cef32e2c18
7 changed files with 33 additions and 10 deletions

@ -5,8 +5,8 @@ import QuizAnswerer from "./QuizAnswerer";
import { QuizIdContext } from "./contexts/QuizIdContext";
import { RootContainerWidthContext } from "./contexts/RootContainerWidthContext";
// const defaultQuizId = "45ef7f9c-784d-4e58-badb-f6b337f08ba0"; // branching
const defaultQuizId = "9ed8d0e9-d355-4fc1-8b89-4f962e3efc52"; //looooong header
const defaultQuizId = "9ed8d0e9-d355-4fc1-8b89-4f962e3efc52"; // branching
//const defaultQuizId = "9ed8d0e9-d355-4fc1-8b89-4f962e3efc52"; //looooong header
// const defaultQuizId = "a9d31460-132a-4479-a3f0-90241498b6f9"; // linear
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 };
} catch (nativeError) {

@ -106,8 +106,6 @@ export const ContactForm = ({ currentQuestion, onShowResult }: Props) => {
return enqueueSnackbar("введена некорректная почта");
}
//почта валидна
setFire(true);
if (fireOnce.current) {
if (
@ -118,6 +116,8 @@ export const ContactForm = ({ currentQuestion, onShowResult }: Props) => {
&& adress.length === 0
) return enqueueSnackbar("Пожалуйста, заполните поля");
//почта валидна, хоть одно поле заполнено
setFire(true);
try {
await inputHC();
fireOnce.current = false;
@ -276,11 +276,15 @@ export const ContactForm = ({ currentQuestion, onShowResult }: Props) => {
</Typography>
</Box>
<Box
component={Link}
target={"_blank"}
href={"https://quiz.pena.digital"}
sx={{
display: "flex",
alignItems: "center",
mt: "20px",
gap: "15px",
textDecoration: "none",
}}
>
<NameplateLogo

@ -1,4 +1,4 @@
import { Box, useTheme } from "@mui/material";
import {Box, Link, useTheme} from "@mui/material";
import { Footer } from "./Footer";
import { Date } from "./questions/Date";
@ -58,9 +58,14 @@ console.log(settings)
}}>
<QuestionByType question={currentQuestion} />
{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>
<Footer

@ -1,6 +1,6 @@
import {
Box,
Button,
Button, Link,
Typography,
useTheme
} from "@mui/material";
@ -123,11 +123,15 @@ export const ResultForm = ({ resultQuestion }: ResultFormProps) => {
}}
>
<Box
component={Link}
target={"_blank"}
href={"https://quiz.pena.digital"}
sx={{
display: "flex",
alignItems: "center",
mt: "15px",
gap: "10px",
textDecoration: "none",
}}
>
<NameplateLogo

@ -237,10 +237,14 @@ export const StartPageViewPublication = () => {
</Box>
<Box
component={Link}
target={"_blank"}
href={"https://quiz.pena.digital"}
sx={{
display: "flex",
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") }} />

@ -10,6 +10,12 @@ export function useQuizData() {
const quizId = useQuizId();
const { data } = useSWR(["quizData", quizId], params => getQuizData(params[1]), {
suspense: true,
revalidateOnFocus: false,
revalidateOnMount:false,
revalidateOnReconnect: false,
refreshWhenOffline: false,
refreshWhenHidden: false,
refreshInterval: 0
});
return data;