diff --git a/craco.config.js b/craco.config.js index fa1bc014..2ff20ab1 100755 --- a/craco.config.js +++ b/craco.config.js @@ -1,17 +1,14 @@ const CracoAlias = require("craco-alias"); module.exports = { - plugins: [ - { - plugin: CracoAlias, - options: { - source: "tsconfig", - // baseUrl SHOULD be specified - // plugin does not take it from tsconfig - baseUrl: "./src", - // tsConfigPath should point to the file where "baseUrl" and "paths" are specified - tsConfigPath: "./tsconfig.extend.json" - } - } - ] -}; \ No newline at end of file + plugins: [ + { + plugin: CracoAlias, + options: { + source: "tsconfig", + baseUrl: "./src", + tsConfigPath: "./tsconfig.extend.json", + }, + }, + ], +}; diff --git a/cypress/e2e/quizHomePageFields.cy.ts b/cypress/e2e/quizHomePageFields.cy.ts index 4336c5a0..d8c60dfd 100644 --- a/cypress/e2e/quizHomePageFields.cy.ts +++ b/cypress/e2e/quizHomePageFields.cy.ts @@ -61,8 +61,6 @@ describe("Тестирование полей главной страницы", cy.wait(500); - // cy.get('[data-cy="create-question"]').click(); - cy.get(`[data-cy="select-questiontype-images"]`).click(); cy.get( '[data-cy="checkbox-optional-question"] > .PrivateSwitchBase-input', diff --git a/cypress/e2e/quizQuestionsFields.cy.ts b/cypress/e2e/quizQuestionsFields.cy.ts index 03d3d2bb..a8a46991 100644 --- a/cypress/e2e/quizQuestionsFields.cy.ts +++ b/cypress/e2e/quizQuestionsFields.cy.ts @@ -22,7 +22,6 @@ describe("Тестирование полей вопросов", () => { cy.get('[data-cy="setup-questions"]').click(); cy.wait(500); - // cy.get('[data-cy="create-question"]').click(); cy.get(`[data-cy="select-questiontype-images"]`).click(); diff --git a/cypress/e2e/quizResultsPage.cy.ts b/cypress/e2e/quizResultsPage.cy.ts index 420bbf6d..f1fd7fdd 100644 --- a/cypress/e2e/quizResultsPage.cy.ts +++ b/cypress/e2e/quizResultsPage.cy.ts @@ -137,17 +137,5 @@ describe("Тест на появление страницы Результато cy.get("#buttonFurther").click(); cy.wait(2000); cy.get("#find-out-more-button").should("not.exist"); - - // let linkText; - - // cy.get('[data-cy="link-test"]') - // .invoke("text") - // .then((text) => { - // linkText = text; - // }); - - // cy.wait(2000).then(() => { - // cy.visit(linkText); - // }); }); }); diff --git a/src/api/auth.ts b/src/api/auth.ts index 6368bcd5..d15cc3d4 100644 --- a/src/api/auth.ts +++ b/src/api/auth.ts @@ -67,7 +67,7 @@ export async function logout(): Promise<[unknown, string?]> { } catch (nativeError) { const [error] = parseAxiosError(nativeError); - //return [null, `Не удалось выйти. ${error}`]; + return [null]; } } diff --git a/src/api/makeRequest.ts b/src/api/makeRequest.ts index a3bdef6c..b9b4c436 100644 --- a/src/api/makeRequest.ts +++ b/src/api/makeRequest.ts @@ -26,7 +26,6 @@ async function makeRequest( return response as TResponse; } catch (e) { const error = e as AxiosError; - //@ts-ignore if ( error.response?.status === 400 && error.response?.data?.message === "refreshToken is empty" diff --git a/src/api/question.ts b/src/api/question.ts index 7af6280b..3990299d 100644 --- a/src/api/question.ts +++ b/src/api/question.ts @@ -44,6 +44,7 @@ async function getQuestionList(body?: Partial) { (question) => { let data = question; for (let key in question) { + const k = key as keyof RawQuestion; //@ts-ignore if (question[key] === " ") data[key] = ""; } diff --git a/src/assets/LandingPict/notebook.tsx b/src/assets/LandingPict/notebook.tsx index bc6caea0..4b9e4fbb 100644 --- a/src/assets/LandingPict/notebook.tsx +++ b/src/assets/LandingPict/notebook.tsx @@ -141,7 +141,6 @@ export default function Notebook({ color }: Props) { = ({ data }) => { > Статистика по ответам - {/* - Фильтры - - - - */} = ({ data, funnelData }) => { const isSmallMonitor = useMediaQuery(theme.breakpoints.down(1150)); const isMobile = useMediaQuery(theme.breakpoints.down(850)); - useEffect(() => { - // const requestFunnel = async () => { - // const [funnelResponse, funnelError] = await getGeneral("14761"); - // if (funnelError) { - // enqueueSnackbar(funnelError); - // return; - // } - // if (!funnelResponse) { - // enqueueSnackbar("Воронка пуста."); - // return; - // } - // setFunnel(funnelResponse); - // }; - // requestFunnel(); - }, []); - if (!data) return ( diff --git a/src/pages/Analytics/Devices.tsx b/src/pages/Analytics/Devices.tsx index 8e7bc0c4..6fbbe9dd 100644 --- a/src/pages/Analytics/Devices.tsx +++ b/src/pages/Analytics/Devices.tsx @@ -100,28 +100,6 @@ export const Devices: FC = ({ data }) => { const isTablet = useMediaQuery(theme.breakpoints.down(1000)); const isMobile = useMediaQuery(theme.breakpoints.down(700)); - // useEffect(() => { - // const requestDevices = async () => { - // const [devicesResponse, devicesError] = await getDevices("14761"); - - // if (devicesError) { - // enqueueSnackbar(devicesError); - - // return; - // } - - // if (!devicesResponse) { - // enqueueSnackbar("Список девайсов пуст."); - - // return; - // } - - // setDevices(devicesResponse); - // }; - - // // requestDevices(); - // }, []); - return ( moment.unix(v).format("ss:mm:HH")).reduce((acc, [k, v]) => ({ ...acc, [k]: v }), {})} height={220} colors={[color]} sx={{ @@ -185,7 +184,6 @@ const GeneralItemTimeConv = ({ }, }, ]} - // dataset={Object.entries(general).map(([, v]) => moment.unix(v).format("ss:mm:HH")).reduce((acc, [k, v]) => ({ ...acc, [k]: v }), {})} height={220} colors={[color]} sx={{ diff --git a/src/pages/ContactFormPage/BranchingForm.tsx b/src/pages/ContactFormPage/BranchingForm.tsx index 8186bbf8..e575d2c2 100644 --- a/src/pages/ContactFormPage/BranchingForm.tsx +++ b/src/pages/ContactFormPage/BranchingForm.tsx @@ -120,8 +120,6 @@ export default function BranchingForm() { component="button" variant="body2" sx={{ color: theme.palette.brightPurple.main }} - // onClick={() => { - // }} > Добавить условие diff --git a/src/pages/ContactFormPage/ContactFormPage.tsx b/src/pages/ContactFormPage/ContactFormPage.tsx index cf5c9e04..7875f7df 100644 --- a/src/pages/ContactFormPage/ContactFormPage.tsx +++ b/src/pages/ContactFormPage/ContactFormPage.tsx @@ -63,28 +63,6 @@ export default function ContactFormPage() { mt: "67px", }} > - {/**/} - {/* */} - {/* Как собрать данные посетителя*/} - {/* {" "}*/} - {/* /!* */} - {/* */} - {/* *!/*/} - {/**/} {!quiz?.config.formContact.fields.name.used && !quiz?.config.formContact.fields.email.used && !quiz?.config.formContact.fields.phone.used && @@ -162,7 +140,6 @@ function ContactFormParent({ outerContainerSx: sx, children }: Props) { > )} - {/* drawerMessengerHC(true)} - sx={{ - fontSize: "16px", - lineHeight: "19px", - color: theme.palette.brightPurple.main, - textDecorationColor: theme.palette.brightPurple.main, - textAlign: "left", - }} - > - Добавить мессенджеры - */} - ); @@ -408,17 +371,6 @@ const EmptyCard = ({ - {/* - Добавить мессенджеры - */} ); diff --git a/src/pages/ContactFormPage/NewField/NewFieldParent.tsx b/src/pages/ContactFormPage/NewField/NewFieldParent.tsx index 32b4bebc..d44da31b 100644 --- a/src/pages/ContactFormPage/NewField/NewFieldParent.tsx +++ b/src/pages/ContactFormPage/NewField/NewFieldParent.tsx @@ -80,44 +80,6 @@ export default function NewFieldParent({ )} - - {/**/} - {/* Ключ*/} - {/* {*/} - {/* updateQuiz(quiz.id, (quiz) => {*/} - {/* quiz.config.formContact.fields[defaultValue].key = target.value;*/} - {/* });*/} - {/* }}*/} - {/* placeholder="text"*/} - {/* sx={{*/} - {/* "& .css-1d3z3hw-MuiOutlinedInput-notchedOutline": {*/} - {/* border: "none",*/} - {/* },*/} - {/* "& .MuiInputBase-root": {*/} - {/* height: "48px",*/} - {/* borderRadius: "10px",*/} - {/* backgroundColor: "#EEE4FC",*/} - {/* },*/} - {/* }}*/} - {/* />*/} - {/* {*/} - {/* updateQuiz(quiz.id, (quiz) => {*/} - {/* quiz.config.formContact.fields[defaultValue].required =*/} - {/* target.checked;*/} - {/* });*/} - {/* }}*/} - {/* label={"Обязательно к заполнению"}*/} - {/* />*/} - {/**/} - {/* - Запрашивать на - - - */} {children} - {/**/} ); } -// export default function InstallQuiz() { - -// const [display, setDisplay] = React.useState("1"); -// const handleChange = (event: SelectChangeEvent) => { -// setDisplay(event.target.value); -// }; - -// const [openVk, setOpenVk] = React.useState(false); -// const handleOpenVk = () => setOpenVk(true); -// const handleCloseVk = () => setOpenVk(false); - -// const [openDom, setOpenDom] = React.useState(false); -// const handleOpenDom = () => setOpenDom(true); -// const handleCloseDom = () => setOpenDom(false); - -// const [backgroundType, setBackgroundType] = useState("text"); - -// const theme = useTheme(); - -// return ( -// <> -// -// -// -// -// Ссылка на квиз - -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// - -// Не опубликован -// -// -// -// -// -// Вконтакте -// - -// Для публикации сниппета на стене группы, призывающего пройти тест. -// -// Подключить -// -// -// -// -// -// Свой домен -// -// Подключите свой домен, если хотите, чтобы квиз открывался по вашей ссылке. -// -// Подключить -// -// -// -// -// -// -// Установка квизов на сайте -// -// -// Способ установки -// -// -// -// {buttonInstall.map((e, i) => ( -// {}} -// sx={{ -// display: "flex", -// flexDirection: "column", -// justifyContent: "start", -// alignItems: "start", -// maxWidth: "205px", -// gap: "15px", -// }} -// > -// -// {e.title} -// -// {e.text} -// -// -// ))} -// -// -// -// -// -// -// -// -// -// -// -// - -// -// -// -// Добавить квиз в группу ВК -// -// -// -// 1. Добавьте приложение в сообщество -// -// -// Для публикации сниппета на стене, призывающего пройти тест, вставьте в новую запись ссылку на приложение -// -// -// -// где XXXXXXXXXXX - id вашего сообщества (полный адрес ссылки можно узнать в браузерной строке, открыв -// приложение в вашей группе -// -// - -// -// 2. Откройте квиз в группе (вы должны быть администратором группы) -// -// Справа снизу нажмите на значок "редактировать" В появившемся окне введите id квиза и нажмите -// "Привязать". Готово! Квиз привязан к группе -// -// ID этого квиза -// -// - -// -// -// -// -// -// -// - -// -// -// -// Подключить свой домен -// -// -// -// -// Подключите домен к проекту, чтобы создать несколько квизов на одном домене -// -// 1. Настройте записи в регистраторе домена -// -// setBackgroundType("text")}> -// Для поддоменов -// -// setBackgroundType("video")}> -// Для доменов -// -// - -// -// Создайте для нужного поддомена две cname-записи -// -// - -// -// -// Как подключить свой домен/поддомен к квизу? Ошибки при подключении домена -// -// - -// -// 2. Укажите домен и сохраните квиз - -// -// -// -// -// -// -// } -// label="Password" -// /> -// -// - -// -// -// Привязка домена и обновление DNS записей может занять до 48 часов -// -// -// -// -// -// -// -// -// ); -// } - const buttonInstall: { icon: string; title: string; text: string }[] = [ { icon: OnButton, diff --git a/src/pages/InstallQuiz/InstallQzCode.tsx b/src/pages/InstallQuiz/InstallQzCode.tsx index f2cd65ce..2474d0e5 100644 --- a/src/pages/InstallQuiz/InstallQzCode.tsx +++ b/src/pages/InstallQuiz/InstallQzCode.tsx @@ -67,77 +67,8 @@ export default function InstallQzCode() { }} /> - {/**/} - {/* 2. Код кнопки*/} - {/* */} - {/* Установите код в то место, где должна быть кнопка открытия quiz*/} - {/* */} - {/* */} - {/* */} - {/* */} - {/* */} - {/* */} - {/* ),*/} - {/* }}*/} - {/* />*/} - {/* */} - {/* */} - {/* */} - {/* {*/} - {/* // }}*/} - {/* >*/} - {/* Инструкция к платформам*/} - {/* */} - {/* */} - {/* */} - {/* */} - {/* */} - {/* */} - {/**/} - {/**/} - {/* 3. Проверьте правильность установки*/} - {/* */} - {/* Введите полный адрес страницы, где вы установили quiz и нажмите*/} - {/* "проверить"*/} - {/* */} - {/**/} - {/**/} - {/* Для добавления нескольких quiz на одну страницу, код инициализации*/} - {/* достаточно добавить один раз с любого quiz, а затем вставить кнопки*/} - {/* открытия с нужных quiz*/} - {/**/} ); diff --git a/src/pages/InstallQuiz/OnButtonInstall.tsx b/src/pages/InstallQuiz/OnButtonInstall.tsx index ead1c384..20c2393d 100644 --- a/src/pages/InstallQuiz/OnButtonInstall.tsx +++ b/src/pages/InstallQuiz/OnButtonInstall.tsx @@ -15,16 +15,13 @@ export default function OnButtonInstall() { return ( <> - {/*левая часть*/} - {/*бокс с кнопкой*/} - {/*правая часть*/} - {/*левая часть*/} @@ -39,7 +38,6 @@ export default function VidjetInstall() { сохраняются. - {/*правая часть*/} Расположение diff --git a/src/pages/Landing/Blog.tsx b/src/pages/Landing/Blog.tsx deleted file mode 100644 index 36c35043..00000000 --- a/src/pages/Landing/Blog.tsx +++ /dev/null @@ -1,112 +0,0 @@ -import React from "react"; -import Box from "@mui/material/Box"; -import { Typography } from "@mui/material"; -import SectionStyled from "./SectionStyled"; -import { styled } from "@mui/material/styles"; - -const BoxCardBlog = styled("div")(({ theme }) => ({ - [theme.breakpoints.down("md")]: { - width: "100%", - maxWidth: "none", - }, -})); - -function CardBlog() { - return ( - - - - - 01.09.2022 - - - Как продвигать квиз за 10 000 ₽ в месяц - - - - ); -} - -export default function Component() { - return ( - - - - Блог - - - - Кейсы, дайджесты и отборные рекомендации - - - - - - - - - - ); -} diff --git a/src/pages/Landing/BusinessPluses.tsx b/src/pages/Landing/BusinessPluses.tsx index 37e1c2d3..d6df85ab 100644 --- a/src/pages/Landing/BusinessPluses.tsx +++ b/src/pages/Landing/BusinessPluses.tsx @@ -10,15 +10,11 @@ import Icon3 from "./images/icons/DoneIcon"; const BoxPluses = styled("div")(({ theme }) => ({ [theme.breakpoints.down("md")]: { flexDirection: "column", - // alignItems: 'center', - // textAlign: 'center', width: "100%", }, })); const BoxCard = styled("div")(({ theme }) => ({ - [theme.breakpoints.down("md")]: { - // alignItems: 'center', - }, + [theme.breakpoints.down("md")]: {}, })); const BoxText = styled("div")(({ theme }) => ({ diff --git a/src/pages/Landing/Counter.tsx b/src/pages/Landing/Counter.tsx index 7ec98116..7802686a 100644 --- a/src/pages/Landing/Counter.tsx +++ b/src/pages/Landing/Counter.tsx @@ -15,7 +15,6 @@ export default function Counter() { display: "flex", justifyContent: "center", alignItems: "flex-start", - // height: isMobile ? "606px" : isTablet ? "430px" : "208px", boxSizing: "border-box", padding: isTablet ? "0 40px" : "0 20px", backgroundColor: "#333647", diff --git a/src/pages/Landing/HeaderLanding.tsx b/src/pages/Landing/HeaderLanding.tsx index 0e4ef635..4b172ab9 100644 --- a/src/pages/Landing/HeaderLanding.tsx +++ b/src/pages/Landing/HeaderLanding.tsx @@ -48,30 +48,6 @@ export default function Component() { - {/**/} - {/* {buttonMenu.map( (element, index) => (*/} - {/* {*/} - {/* setSelect(index);*/} - {/* }}*/} - {/* isActive={select === index}*/} - {/* />*/} - {/* ))}*/} - {/**/} - ))} - - - - - - - - ); -} diff --git a/src/pages/Landing/WhatTheFeatures.tsx b/src/pages/Landing/WhatTheFeatures.tsx index a431320d..dc1d9663 100644 --- a/src/pages/Landing/WhatTheFeatures.tsx +++ b/src/pages/Landing/WhatTheFeatures.tsx @@ -3,7 +3,6 @@ import Box from "@mui/material/Box"; import { SxProps, Typography, useMediaQuery, useTheme } from "@mui/material"; import SectionStyled from "./SectionStyled"; import Button from "@mui/material/Button"; -// import Desktop from '../../assets/LandingPict/Desktop.png'; import Desktop1 from "./images/Frame 1171274552.png"; import Desktop2 from "./images/Frame 1171274552-1.png"; import Desktop3 from "./images/Frame 1171274552-2.png"; @@ -438,21 +437,6 @@ export default function Component() { - {/*{isMobile && (*/} - {/* */} - {/* Все возможности сервиса*/} - {/* */} - {/*)}*/} {!isMobile && ( */} - {/* */} - {/* ))}*/} - {/**/} {isMobile ? (