diff --git a/package.json b/package.json index 75592eed..ada5c835 100755 --- a/package.json +++ b/package.json @@ -7,7 +7,7 @@ "@emotion/react": "^11.10.5", "@emotion/styled": "^11.10.5", "@frontend/kitui": "^1.0.74", - "@frontend/squzanswerer": "^1.0.6", + "@frontend/squzanswerer": "^1.0.17", "@mui/icons-material": "^5.10.14", "@mui/material": "^5.10.14", "@mui/x-charts": "^6.19.5", diff --git a/src/pages/Analytics/General.tsx b/src/pages/Analytics/General.tsx index a8084eef..0e55ab09 100644 --- a/src/pages/Analytics/General.tsx +++ b/src/pages/Analytics/General.tsx @@ -86,8 +86,6 @@ export const General: FC = ({ data }) => { ); } - console.log(data.Open) - console.log(dateParser(data.Open)) return ( { setModalQuestionParentContentId(csElement.data.id); - console.log("csElement ", csElement); setOpenedModalQuestions( !( isQuestionProhibited(csElement.data.type) && diff --git a/src/pages/Questions/DraggableList/index.tsx b/src/pages/Questions/DraggableList/index.tsx index 3bef5825..03346b3f 100644 --- a/src/pages/Questions/DraggableList/index.tsx +++ b/src/pages/Questions/DraggableList/index.tsx @@ -28,8 +28,6 @@ export const DraggableList = ({ useEffect(() => { if (!isLoading && quiz && !filteredQuestions.length) { - console.log("useEffect", quiz); - console.log(Number(quiz.backendId)); createUntypedQuestion(Number(quiz.backendId)); } }, [quiz, filteredQuestions]); diff --git a/src/pages/Questions/QuestionsPage.tsx b/src/pages/Questions/QuestionsPage.tsx index 48fc8b6e..e9798472 100755 --- a/src/pages/Questions/QuestionsPage.tsx +++ b/src/pages/Questions/QuestionsPage.tsx @@ -36,7 +36,6 @@ export default function QuestionsPage({ updateEditSomeQuestion(); }, []); - console.log("quiz", quiz); if (!quiz) return null; return ( diff --git a/src/pages/Tariffs/Tariffs.tsx b/src/pages/Tariffs/Tariffs.tsx index 1ef1c15a..5f52a165 100644 --- a/src/pages/Tariffs/Tariffs.tsx +++ b/src/pages/Tariffs/Tariffs.tsx @@ -91,7 +91,7 @@ function TariffPage() { const tariffsList = await getTariffsList(); const discounts = await makeRequest({ method: "GET", - url: process.env.REACT_APP_DOMAIN + "/price/discounts", + url: `${process.env.REACT_APP_DOMAIN}/price/discount/user/${userId}`, }); setUser(user); setTariffs(tariffsList); diff --git a/src/pages/Tariffs/tariffsUtils/createTariffElements.tsx b/src/pages/Tariffs/tariffsUtils/createTariffElements.tsx index 12fc3315..722dcdb7 100644 --- a/src/pages/Tariffs/tariffsUtils/createTariffElements.tsx +++ b/src/pages/Tariffs/tariffsUtils/createTariffElements.tsx @@ -15,7 +15,6 @@ export const createTariffElements = ( const tariffElements = filteredTariffs .filter((tariff) => tariff.privileges.length > 0) .map((tariff, index) => { - console.log("USSSSSES", user); const { priceBeforeDiscounts, priceAfterDiscounts } = calcTariffPrice( tariff, discounts, diff --git a/src/stores/questions/actions.ts b/src/stores/questions/actions.ts index 5f4aa971..ae0a57d0 100644 --- a/src/stores/questions/actions.ts +++ b/src/stores/questions/actions.ts @@ -44,7 +44,6 @@ export const createUntypedQuestion = ( ) => setProducedState( (state) => { - console.log("createUntypedQuestion", quizId); const newUntypedQuestion = { id: nanoid(), quizId, @@ -278,7 +277,6 @@ export const updateQuestion = async ( if (!q) return; if (q.type === null) throw new Error("Cannot send update request for untyped question"); - console.log("отправляемый квешен", q); try { const response = await questionApi.edit( questionToEditQuestionRequest(replaceEmptyLinesToSpace(q)), @@ -449,8 +447,6 @@ export const createTypedQuestion = async ( requestQueue.enqueue(`createTypedQuestion-${questionId}`, async () => { const questions = useQuestionsStore.getState().questions; const question = questions.find((q) => q.id === questionId); - console.log("createTypedQuestion", question); - console.log("createTypedQuestion", question?.quizId); if (!question) return; if (question.type !== null) throw new Error("Cannot upgrade already typed question"); diff --git a/src/stores/quizes/hooks.ts b/src/stores/quizes/hooks.ts index aead730e..b95ec60d 100644 --- a/src/stores/quizes/hooks.ts +++ b/src/stores/quizes/hooks.ts @@ -29,7 +29,6 @@ export function useQuizes() { export function useCurrentQuiz() { const { quizes, editQuizId } = useQuizStore(); - console.log(editQuizId) const quiz = quizes.find((q) => q.backendId === editQuizId); diff --git a/src/stores/results/actions.ts b/src/stores/results/actions.ts index 9fcd03b2..5887be21 100644 --- a/src/stores/results/actions.ts +++ b/src/stores/results/actions.ts @@ -96,7 +96,6 @@ export const ExportResults = async ( editQuizId, parseFilters(filterNew, filterDate), ); - console.log(typeof data); const blob = data; const link = document.createElement("a"); diff --git a/src/stores/ticket.ts b/src/stores/ticket.ts index 614e28b6..e3d3f647 100644 --- a/src/stores/ticket.ts +++ b/src/stores/ticket.ts @@ -69,7 +69,6 @@ export const setIsMessageSending = ( export const addOrUpdateUnauthMessages = (receivedMessages: TicketMessage[]) => updateTicket((ticket) => { const filtered = filterMessageUncompleteness(receivedMessages); - console.log(filtered); if (filtered.length === 0) return; const messageIdToMessageMap: { [messageId: string]: TicketMessage } = {}; diff --git a/src/ui_kit/FloatingSupportChat/Chat.tsx b/src/ui_kit/FloatingSupportChat/Chat.tsx index a8b60615..590d04bf 100644 --- a/src/ui_kit/FloatingSupportChat/Chat.tsx +++ b/src/ui_kit/FloatingSupportChat/Chat.tsx @@ -71,13 +71,11 @@ export default function Chat({ const sendMessageHC = async () => { const successful = await sendMessage(messageField); - console.log("successful ", successful); if (successful) { setMessageField(""); } }; const sendFileHC = async (file: File) => { - console.log(file); const check = checkAcceptableMediaType(file); if (check.length > 0) { enqueueSnackbar(check); @@ -86,7 +84,6 @@ export default function Chat({ setDisableFileButton(true); await sendFile(file); setDisableFileButton(false); - console.log(disableFileButton); }; const fileInputRef = useRef(null); @@ -344,7 +341,6 @@ export default function Chat({ { - console.log(disableFileButton); if (!disableFileButton) fileInputRef.current?.click(); }} > diff --git a/src/ui_kit/FloatingSupportChat/ChatImageNewWindow.tsx b/src/ui_kit/FloatingSupportChat/ChatImageNewWindow.tsx index 3adc7e41..4138ea5c 100644 --- a/src/ui_kit/FloatingSupportChat/ChatImageNewWindow.tsx +++ b/src/ui_kit/FloatingSupportChat/ChatImageNewWindow.tsx @@ -3,7 +3,6 @@ import { useLocation } from "react-router-dom"; export default function ChatImageNewWindow() { const location = useLocation(); - console.log(location); const srcImage = location.pathname.split("image/")[1]; return ( <> diff --git a/src/ui_kit/FloatingSupportChat/ChatVideo.tsx b/src/ui_kit/FloatingSupportChat/ChatVideo.tsx index 80563da4..5fb70d89 100644 --- a/src/ui_kit/FloatingSupportChat/ChatVideo.tsx +++ b/src/ui_kit/FloatingSupportChat/ChatVideo.tsx @@ -26,9 +26,6 @@ export default function ChatImage({ const theme = useTheme(); const upMd = useMediaQuery(theme.breakpoints.up("md")); const navigate = useNavigate(); - useEffect(() => { - () => console.log("delete"); - }); const messageBackgroundColor = isSelf ? "white" : unAuthenticated diff --git a/src/ui_kit/FloatingSupportChat/index.tsx b/src/ui_kit/FloatingSupportChat/index.tsx index be500939..03ab1863 100644 --- a/src/ui_kit/FloatingSupportChat/index.tsx +++ b/src/ui_kit/FloatingSupportChat/index.tsx @@ -103,7 +103,6 @@ export default () => { messagesPerPage: ticket.messagesPerPage, messageApiPage: ticket.apiPage, onSuccess: useCallback((messages) => { - console.log("получены сообщения", messages); addOrUpdateUnauthMessages(messages); }, []), onError: useCallback((error: Error) => { @@ -119,7 +118,6 @@ export default () => { process.env.REACT_APP_DOMAIN + `/heruvym/ticket?ticket=${ticket.sessionData?.ticketId}&s=${ticket.sessionData?.sessionId}`, onNewData: (ticketMessages) => { - console.log("вывалилось: ", ticketMessages); updateSSEValue(ticketMessages); addOrUpdateUnauthMessages(ticketMessages); }, @@ -193,7 +191,6 @@ export default () => { // const isFileTypeAccepted = ACCEPT_SEND_FILE_TYPES_MAP.some( // fileType => file.name.toLowerCase().endsWith(fileType) // ); - // console.log(file.name.toLowerCase().endsWith(".png")) // if (!isFileTypeAccepted) return setModalWarningType("errorType"); console.log("тут ошибка", modalWarningType); let data; diff --git a/src/ui_kit/Modal/ExportContactsModal.tsx b/src/ui_kit/Modal/ExportContactsModal.tsx index cd662fe6..a1b08689 100644 --- a/src/ui_kit/Modal/ExportContactsModal.tsx +++ b/src/ui_kit/Modal/ExportContactsModal.tsx @@ -28,8 +28,6 @@ export const ExportContactsModal: FC = ({ const isMobile = useMediaQuery(theme.breakpoints.down(650)); const [fromDate, setFromDate] = useState(""); const [toDate, setToDate] = useState(""); - console.log("from", fromDate); - console.log("to", toDate); const style = { position: "absolute" as "absolute", diff --git a/src/utils/checkAcceptableMediaType.ts b/src/utils/checkAcceptableMediaType.ts index 292da9a8..d4e1f0bc 100644 --- a/src/utils/checkAcceptableMediaType.ts +++ b/src/utils/checkAcceptableMediaType.ts @@ -17,7 +17,6 @@ export const checkAcceptableMediaType = (file: File) => { const extension = segments[segments.length - 1]; const type = extension.toLowerCase(); - console.log(type); switch (type) { case ACCEPT_SEND_MEDIA_TYPES_MAP.document.find((name) => name === type): if (file.size > MAX_FILE_SIZE) return TOO_LARGE_TEXT; diff --git a/src/utils/hooks/useAfterpay.ts b/src/utils/hooks/useAfterpay.ts index b368b311..4bdfb5ee 100644 --- a/src/utils/hooks/useAfterpay.ts +++ b/src/utils/hooks/useAfterpay.ts @@ -11,7 +11,6 @@ export const useAfterpay = () => { const redirectUrl = new URL(window.location.href); redirectUrl.searchParams.set("afterpay", "false"); navigate(redirectUrl); - console.log("pay"); const payCartPendingRequestDeadline = localStorage.getItem( "payCartPendingRequestDeadline", diff --git a/src/utils/hooks/useAnalytics.ts b/src/utils/hooks/useAnalytics.ts index 8f775b39..d2801f2d 100644 --- a/src/utils/hooks/useAnalytics.ts +++ b/src/utils/hooks/useAnalytics.ts @@ -26,7 +26,6 @@ export function useAnalytics({ ready, quizId, to, from }: useAnalyticsProps) { const [questions, setQuestions] = useState(null); useEffect(() => { - console.log({ ready, quizId, to, from }) if (!quizId || !ready) return; const requestStatistics = async () => {