From 2465e22cf6b9e96650f10e80e0c4ff64922a7820 Mon Sep 17 00:00:00 2001 From: Emmanuel Vitor Date: Wed, 18 Jan 2023 03:08:18 -0300 Subject: [PATCH] fix: ajuste de rotas da spa --- src/components/BreadCrumb/BreadCreumb.tsx | 5 ++-- .../Footer/Accordion/AccordionFooter.tsx | 8 +++--- .../Footer/ButtonsFixeds/ButtonWhatsapp.tsx | 2 +- .../ButtonsFixeds/assets/arrowToTop.svg | 13 +++++++++ .../Header/HeaderDesk/HeaderBottom.tsx | 2 +- .../Header/HeaderMobile/BurguerMenu.tsx | 2 +- src/pages/Home.tsx | 3 ++- src/pages/Intitucional/Contato.module.scss | 22 +++++++++++++-- src/pages/Intitucional/Contato.tsx | 27 ++++++++++++------- src/routes.tsx | 14 +++++----- src/schema/ContactFormSchema.ts | 1 - 11 files changed, 70 insertions(+), 29 deletions(-) create mode 100644 src/components/Footer/ButtonsFixeds/assets/arrowToTop.svg diff --git a/src/components/BreadCrumb/BreadCreumb.tsx b/src/components/BreadCrumb/BreadCreumb.tsx index 49b41a2..457c3ea 100644 --- a/src/components/BreadCrumb/BreadCreumb.tsx +++ b/src/components/BreadCrumb/BreadCreumb.tsx @@ -10,7 +10,7 @@ export const BreadCrumb = () => { const { pathname } = useLocation() - const routeName = pathname.split("/")[1] + // const routeName = pathname.split("/")[1] return ( diff --git a/src/components/Header/HeaderMobile/BurguerMenu.tsx b/src/components/Header/HeaderMobile/BurguerMenu.tsx index cf03652..3707116 100644 --- a/src/components/Header/HeaderMobile/BurguerMenu.tsx +++ b/src/components/Header/HeaderMobile/BurguerMenu.tsx @@ -38,7 +38,7 @@ export const BurguerMenu = ({ isOpenMenu, setisOpenMenu }: MenuMobile) => { Saiba Mais - + Institucional diff --git a/src/pages/Home.tsx b/src/pages/Home.tsx index 2e1fd4f..e21f5ce 100644 --- a/src/pages/Home.tsx +++ b/src/pages/Home.tsx @@ -3,6 +3,7 @@ import { Footer } from "../components/Footer/Footer" import { Header } from "../components/Header/Header" import { BreadCrumb } from "../components/BreadCrumb/BreadCreumb" import styles from "./styles.module.scss" +import { Instituicional } from "./Intitucional/Instituicional" @@ -15,7 +16,7 @@ export const Home = () => {
- + {/* */}
diff --git a/src/pages/Intitucional/Contato.module.scss b/src/pages/Intitucional/Contato.module.scss index 25e9d22..272f379 100644 --- a/src/pages/Intitucional/Contato.module.scss +++ b/src/pages/Intitucional/Contato.module.scss @@ -58,8 +58,6 @@ } - - .invalid { border: 1px solid red; @@ -82,6 +80,26 @@ } } + .success { + font-family: 'Roboto'; + font-style: normal; + font-weight: 400; + font-size: 12px; + line-height: 14px; + /* identical to box height */ + + + color: #008000; + + margin-top: 12.56px; + + @media (min-width: 2500px) { + font-size: 24px; + line-height: 28px; + + } + } + button { padding: 17px; diff --git a/src/pages/Intitucional/Contato.tsx b/src/pages/Intitucional/Contato.tsx index 12f1a36..b633694 100644 --- a/src/pages/Intitucional/Contato.tsx +++ b/src/pages/Intitucional/Contato.tsx @@ -1,9 +1,9 @@ -import { Formik, Form, Field, ErrorMessage } from "formik"; +import { Formik, Form, Field, ErrorMessage, FormikHelpers } from "formik"; import ContactFormSchema from "../../schema/ContactFormSchema"; import { Article } from "./Article"; import style from "./Contato.module.scss"; import InputMask from 'react-input-mask'; - +import React, { useState } from "react"; interface IFormikValues { name: string; email: string; @@ -24,18 +24,23 @@ const initialValues = { checkbox: false, }; -const formSubmit = (values: IFormikValues) => { - console.log(values); -}; +let listContact: Array = [] + export const Contato = () => { + + const [isValidateForm, setisValidateForm] = useState(false); return (
{ + listContact.push(values); + actions.resetForm(); + ({ ...values }) ? setisValidateForm(true) : setisValidateForm(false); + }} validationSchema={ContactFormSchema} > {({ errors, touched }) => ( @@ -81,9 +86,10 @@ export const Contato = () => { @@ -91,7 +97,7 @@ export const Contato = () => { { + {isValidateForm && ( + *Formulario enviado com sucesso! + )} )} -
+ ); }; diff --git a/src/routes.tsx b/src/routes.tsx index 5b6134b..903b31e 100644 --- a/src/routes.tsx +++ b/src/routes.tsx @@ -15,13 +15,13 @@ export const Routes = () => { return ( }> - < Route path="institucional/sobre" element={}> - } /> - } /> - } /> - } /> - } /> - } /> + < Route path="/" element={}> + } /> + } /> + } /> + } /> + } /> + } /> diff --git a/src/schema/ContactFormSchema.ts b/src/schema/ContactFormSchema.ts index 739d837..8c34d2d 100644 --- a/src/schema/ContactFormSchema.ts +++ b/src/schema/ContactFormSchema.ts @@ -2,7 +2,6 @@ import * as Yup from "yup"; import { cpfRegex, - dateRegex, instaRegex, phoneRegex } from "./ContactValidations"; -- 2.34.1