From a63623d1225e5161b71bcc42815c9b046a445703 Mon Sep 17 00:00:00 2001 From: Tamara Date: Sun, 7 Jan 2024 02:56:13 +0300 Subject: [PATCH] =?UTF-8?q?=D1=84=D0=BE=D1=80=D0=BC=D0=B0=20=D0=BA=D0=BE?= =?UTF-8?q?=D0=BD=D1=82=D0=B0=D0=BA=D1=82=D0=BE=D0=B2=20=D0=BC=D0=B5=D0=BD?= =?UTF-8?q?=D1=8F=D0=B5=D1=82=20=D0=BF=D0=BE=D0=BB=D0=BE=D0=B6=D0=B5=D0=BD?= =?UTF-8?q?=D0=B8=D0=B5=20=D0=B1=D0=BB=D0=BE=D0=BA=D0=BE=D0=B2=20=D0=BF?= =?UTF-8?q?=D1=80=D0=B8=20=D1=83=D0=B2=D0=B5=D0=BB=D0=B8=D1=87=D0=B5=D0=BD?= =?UTF-8?q?=D0=B8=D0=B8=20=D0=BA=D0=BE=D0=BB=D0=B8=D1=87=D0=B5=D1=81=D1=82?= =?UTF-8?q?=D0=B2=D0=B0=20=D0=BF=D0=BE=D0=BB=D0=B5=D0=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/ViewPublicationPage/ContactForm.tsx | 34 +++++++++++++++---- src/pages/ViewPublicationPage/ResultForm.tsx | 1 + 2 files changed, 29 insertions(+), 6 deletions(-) diff --git a/src/pages/ViewPublicationPage/ContactForm.tsx b/src/pages/ViewPublicationPage/ContactForm.tsx index db623d1..97c6311 100644 --- a/src/pages/ViewPublicationPage/ContactForm.tsx +++ b/src/pages/ViewPublicationPage/ContactForm.tsx @@ -56,7 +56,7 @@ export const ContactForm = ({ const fireOnce = useRef(true) const [fire, setFire] = useState(false) - const isMobile = useMediaQuery(theme.breakpoints.down(600)); + const isMobile = useMediaQuery(theme.breakpoints.down(850)); const followNextForm = () => { setShowContactForm(false); @@ -110,6 +110,19 @@ export const ContactForm = ({ } } + //@ts-ignore + let FCcopy: any = settings?.cfg.formContact.fields || settings?.cfg.formContact; + + let filteredFC: any = {} + for (let i in FCcopy) { + let field = FCcopy[i] + console.log(filteredFC) + if (field.used) { + filteredFC[i] = field + } + } + let isWide = Object.keys(filteredFC).length > 2 + console.log(isWide) if (!resultQuestion) return @@ -120,19 +133,28 @@ export const ContactForm = ({ alignItems: "center", justifyContent: "center", backgroundColor: theme.palette.background.default, - height: "100vh" + height: "100vh", + overflow: "auto", }} > - - +