diff --git a/src/assets/styles/components/myButton.module.scss b/src/assets/styles/components/myButton.module.scss index 1e50421..e2d45c6 100644 --- a/src/assets/styles/components/myButton.module.scss +++ b/src/assets/styles/components/myButton.module.scss @@ -1,5 +1,6 @@ .main { - height: 100%; + // height: 100%; + max-height: 40px; button { font-size: 15px; height: 100%; diff --git a/src/assets/styles/components/myInput.module.scss b/src/assets/styles/components/myInput.module.scss index df57d08..3e39702 100644 --- a/src/assets/styles/components/myInput.module.scss +++ b/src/assets/styles/components/myInput.module.scss @@ -1,11 +1,11 @@ .main { - height: 100%; + max-height: 40px; input { border: 1px solid rgb(180, 180, 180); height: 100%; border-radius: 5px; font-family: "Montserrat", sans-serif; - padding: 0 3px; + padding: .40em 3px; color: rgb(40, 40, 40); font-size: 15px; } diff --git a/src/assets/styles/forms.module.scss b/src/assets/styles/forms.module.scss index f9dc24c..12664be 100644 --- a/src/assets/styles/forms.module.scss +++ b/src/assets/styles/forms.module.scss @@ -14,7 +14,7 @@ height: 10%; display: flex; justify-content: space-between; - align-items: center; + align-items: end; padding: 0 5%; } diff --git a/src/assets/styles/newForm.module.scss b/src/assets/styles/newForm.module.scss index e860114..afd128c 100644 --- a/src/assets/styles/newForm.module.scss +++ b/src/assets/styles/newForm.module.scss @@ -10,7 +10,6 @@ } .header { - // text-align: right; display: flex; justify-content: space-between; width: 100%; @@ -26,55 +25,34 @@ height: 100%; display: flex; justify-content: space-between; - align-items: center; position: relative; span { position: absolute; - height: 100%; font-size: 8px; font-family: "Montserrat", sans-serif; top: -40%; left: 2%; } - input { - display: block; - height: 100%; - font-size: 15px; - font-family: "Montserrat", sans-serif; - border: 1px solid rgb(200, 200, 200); - padding: 1%; - border-radius: 5px; - } } &__title { width: 100%; height: 100%; display: flex; justify-content: space-between; - align-items: center; position: relative; span { position: absolute; - height: 100%; font-size: 8px; font-family: "Montserrat", sans-serif; top: -40%; left: 2%; } - input { - display: block; - height: 100%; - font-size: 15px; - font-family: "Montserrat", sans-serif; - border: 1px solid rgb(200, 200, 200); - padding: 1%; - border-radius: 5px; - } } } &__listBtn { display: flex; justify-content: space-between; + width: 30%; } } diff --git a/src/hooks/api/formApi.js b/src/hooks/api/formApi.js index 1ecffb3..30c6de4 100644 --- a/src/hooks/api/formApi.js +++ b/src/hooks/api/formApi.js @@ -33,11 +33,11 @@ async function addFormBlockApi(token, formId, data) { } }; -async function updateBlockApi(token, blockId, data) { +async function updateBlockApi(token, formId, data) { try { - const response = await axios.post(`https://api.minerva.krbl.ru/formBuilder/edit/${blockId}/set`, + const response = await axios.post(`https://api.minerva.krbl.ru/formBuilder/edit/${formId}/set`, { - "data": data + data: data }, { headers: { diff --git a/src/pages/Forms.jsx b/src/pages/Forms.jsx index d57e9ca..fdecb80 100644 --- a/src/pages/Forms.jsx +++ b/src/pages/Forms.jsx @@ -13,7 +13,7 @@ const Forms = () => { const {forms, setForms} = useContext(FormsData); const {user, setUser} = useContext(UserData); const [stateLoading, setStateLoading] = useState(false); - const [removeIdForm, setRemoveIdForm] = useState(false); + const [currentRemoveForm, setCurrentRemoveForm] = useState(false); const [searchForm, setSearchForm] = useState(""); const [cookies, _, __] = useCookies(["user"]); @@ -120,14 +120,15 @@ const Forms = () => {