From ca131a225c2b54762855aa233c4c73f791ecae6e Mon Sep 17 00:00:00 2001 From: kuwsh1n Date: Sun, 12 May 2024 20:20:29 +0300 Subject: [PATCH] fix ticket 5 --- src/App.jsx | 2 - src/assets/styles/answersForm.module.scss | 47 ++++++++++++------ src/components/CheckModal.jsx | 4 +- src/hooks/api/answersApi.js | 36 ++++++++++++++ src/hooks/api/enterAccountApi.js | 3 +- src/hooks/api/formApi.js | 27 +++++------ src/pages/AnswersForm.jsx | 58 +++++++++++++++++------ src/pages/Forms.jsx | 9 ++-- 8 files changed, 131 insertions(+), 55 deletions(-) create mode 100644 src/hooks/api/answersApi.js diff --git a/src/App.jsx b/src/App.jsx index dd57b24..42f840b 100644 --- a/src/App.jsx +++ b/src/App.jsx @@ -32,7 +32,6 @@ const App = () => { {id: 8, text: 'Дата', typeTag: InputDate} ]); - // useEffect(() => globalRender(window.location.pathname, user, navigate)); const [cookies, _, __] = useCookies(["user"]); useEffect(() => { @@ -41,7 +40,6 @@ const App = () => { if (response.status === 200) { setUser(response.data); - console.log(response.data) globalRender(window.location.pathname, response.data, navigate); } else { diff --git a/src/assets/styles/answersForm.module.scss b/src/assets/styles/answersForm.module.scss index cf73951..7afa108 100644 --- a/src/assets/styles/answersForm.module.scss +++ b/src/assets/styles/answersForm.module.scss @@ -75,36 +75,55 @@ background-color: rgb(200, 200, 200); } &__column { - display: flex; - justify-content: space-between; - align-items: center; font-size: 15px; font-family: "Montserrat", sans-serif; padding: 5px; + width: 100%; border-bottom: 1px solid rgb(200, 200, 200); + &__wrapper { + display: flex; + justify-content: space-between; + align-items: center; + height: 100%; + width: 95%; + } } &__item { padding: 0 5px; - // border-bottom: 1px solid rgb(200, 200, 200); font-size: 15px; font-family: "Montserrat", sans-serif; - display: flex; - justify-content: space-between; - align-items: center; height: 20%; width: 100%; + position: relative; &:hover { background-color: rgba(230, 230, 230, 0.6); } - &__user { - cursor: pointer; - &:hover { - text-decoration: underline; + &__wrapper { + display: flex; + justify-content: space-between; + align-items: center; + height: 100%; + width: 95%; + &__user { + cursor: pointer; + &:hover { + text-decoration: underline; + } + } + &__date { + + } + i { + font-size: 13px; + position: absolute; + right: 10px; + cursor: pointer; + &:hover { + color: rgb(199, 73, 73); + } } } - &__date { - - } + } } } diff --git a/src/components/CheckModal.jsx b/src/components/CheckModal.jsx index 1b860cd..912d4f5 100644 --- a/src/components/CheckModal.jsx +++ b/src/components/CheckModal.jsx @@ -2,10 +2,10 @@ import React from "react"; import classes from "../assets/styles/components/checkModal.module.scss"; import MyButton from "./MyButton.jsx"; -const CheckModal = ({message, action}) => { +const CheckModal = ({postfix, message, action}) => { return ( -