development #21

Merged
emmanuelvitor merged 40 commits from development into main 2023-01-19 02:44:29 +00:00
11 changed files with 70 additions and 29 deletions
Showing only changes of commit 2465e22cf6 - Show all commits

View File

@ -10,7 +10,7 @@ export const BreadCrumb = () => {
const { pathname } = useLocation()
const routeName = pathname.split("/")[1]
// const routeName = pathname.split("/")[1]
return (
<nav >
@ -26,7 +26,8 @@ export const BreadCrumb = () => {
<img src={arrowRight} alt="Icone de seta para a direita" />
<span className={styles["routeName"]}>
{routeName}
{/* {routeName} */}
Institucional
</span>
</li>

View File

@ -27,13 +27,13 @@ export const AccordionFooter = () => {
</AccordionItem>
<AccordionItem title="Fale Conosco">
<span className={styleAccordion["contact__us"]}>
<ListItem title={"Atendimento ao Consumidor"} />
<ListItem link="tel:+551141599505" title={"Atendimento ao Consumidor"} />
</span>
<ListItem title={"(11) 4159-9504"} />
<ListItem link="tel:+551141599505" title={"(11) 4159-9504"} />
<span className={styleAccordion["contact__us"]}>
<ListItem title={"Atendimento Online"} />
<ListItem link="tel:+5511994338825" title={"Atendimento Online"} />
</span>
<ListItem title={"(11) 99433-8825"} />
<ListItem link="tel:+5511994338825" title={"(11) 99433-8825"} />
</AccordionItem>
</Accordion>

View File

@ -8,7 +8,7 @@ export const ButtonWhatsapp = () => {
<a
href="https://wa.me/75982170090"
href="https://wa.me/11994338825"
target="_blank"
className={buttons["link"]}
>

View File

@ -0,0 +1,13 @@
<svg width="66" height="137" viewBox="0 0 66 137" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M66 104C66 122.225 51.2254 137 33 137C14.7746 137 0 122.225 0 104C0 85.7746 14.7746 71 33 71C51.2254 71 66 85.7746 66 104Z" fill="#C4C4C4"/>
<path d="M44.7428 107.396C44.741 107.696 44.6177 107.995 44.373 108.226L44.3728 108.226C43.8668 108.704 43.037 108.703 42.5311 108.226L42.5232 108.235L42.5311 108.226L33.3457 99.5599L33.0712 99.3009L32.7967 99.5599L23.6118 108.226C23.1055 108.703 22.2757 108.703 21.7698 108.226L21.7697 108.226C21.5257 107.996 21.4025 107.697 21.4 107.398C21.4019 107.098 21.5251 106.799 21.7698 106.568L21.7698 106.568L32.1506 96.7738C32.4013 96.5373 32.7333 96.4158 33.0712 96.4158C33.4093 96.4158 33.7415 96.5376 33.9922 96.774L44.3728 106.568L44.3729 106.568C44.6171 106.798 44.7403 107.097 44.7428 107.396Z" fill="white" stroke="white" stroke-width="0.8"/>
<g clip-path="url(#clip0_3751_655)">
<path d="M33.0083 0H32.9917C14.7964 0 0 14.8005 0 33C0 40.2188 2.3265 46.9095 6.28237 52.3421L2.16975 64.6016L14.8541 60.5468C20.0723 64.0035 26.2969 66 33.0083 66C51.2036 66 66 51.1954 66 33C66 14.8046 51.2036 0 33.0083 0Z" fill="#4CAF50"/>
<path d="M52.21 46.6001C51.4139 48.8483 48.2542 50.7128 45.7338 51.2573C44.0095 51.6244 41.7573 51.9173 34.1755 48.774C24.4777 44.7563 18.2324 34.9016 17.7457 34.2623C17.2795 33.6229 13.8269 29.0441 13.8269 24.3086C13.8269 19.5731 16.2318 17.2673 17.2012 16.2773C17.9973 15.4646 19.3132 15.0934 20.5754 15.0934C20.9838 15.0934 21.3509 15.114 21.6809 15.1305C22.6503 15.1718 23.137 15.2295 23.7764 16.7599C24.5725 18.678 26.5113 23.4135 26.7423 23.9003C26.9774 24.387 27.2125 25.047 26.8825 25.6864C26.5732 26.3464 26.3009 26.6393 25.8142 27.2003C25.3274 27.7613 24.8654 28.1903 24.3787 28.7925C23.9332 29.3164 23.4299 29.8774 23.9909 30.8468C24.5519 31.7955 26.4907 34.9594 29.3452 37.5004C33.0288 40.7798 36.0153 41.8275 37.0837 42.273C37.8798 42.603 38.8285 42.5246 39.4102 41.9059C40.1485 41.1098 41.0602 39.7898 41.9883 38.4904C42.6483 37.5581 43.4815 37.4426 44.356 37.7726C45.247 38.082 49.9619 40.4126 50.9313 40.8953C51.9007 41.382 52.54 41.613 52.7752 42.0214C53.0062 42.4298 53.0062 44.3479 52.21 46.6001Z" fill="white"/>
</g>
<defs>
<clipPath id="clip0_3751_655">
<rect width="66" height="66" fill="white"/>
</clipPath>
</defs>
</svg>

After

Width:  |  Height:  |  Size: 2.3 KiB

View File

@ -13,7 +13,7 @@ export const HeaderBottom = () => {
<Link className={styleHeader["list__items__link"]} to="/saiba-mais">
Saiba Mais
</Link>
<Link className={styleHeader["list__items__link"]} to="/institucional/sobre">
<Link className={styleHeader["list__items__link"]} to="/sobre">
Institucional
</Link>
</nav>

View File

@ -38,7 +38,7 @@ export const BurguerMenu = ({ isOpenMenu, setisOpenMenu }: MenuMobile) => {
<Link className={styleHeader["list__items__link"]} to="/saiba-mais">
Saiba Mais
</Link>
<Link className={styleHeader["list__items__link"]} to="/institucional/">
<Link className={styleHeader["list__items__link"]} to="/sobre">
Institucional
</Link>
</nav>

View File

@ -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 = () => {
<Header />
<BreadCrumb />
<main className={styles["main"]}>
{/* <Instituicional /> */}
<Outlet />
</main>

View File

@ -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;

View File

@ -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<IFormikValues> = []
export const Contato = () => {
const [isValidateForm, setisValidateForm] = useState(false);
return (
<Article title="Preencha o formulario" className={style["title-contact"]}>
<Formik
onSubmit={formSubmit}
initialValues={initialValues}
onSubmit={(values: IFormikValues, actions) => {
listContact.push(values);
actions.resetForm();
({ ...values }) ? setisValidateForm(true) : setisValidateForm(false);
}}
validationSchema={ContactFormSchema}
>
{({ errors, touched }) => (
@ -81,9 +86,10 @@ export const Contato = () => {
<Field
id="data"
name="data" as={InputMask} mask="99.99.9999"
type="string"
placeholder="00.00.0000"
className={touched.data && style["invalid"]}
className={errors.data && touched.data && style["invalid"]}
/>
<label className={style["label__form"]} htmlFor="telefone">Telefone:</label>
<span className={style["error"]}>
@ -91,7 +97,7 @@ export const Contato = () => {
</span>
<Field
id="telefone"
name="telefone"
name="telefone" as={InputMask} mask="(99) 99999-9999"
type="tel"
placeholder="(00) 00000-0000"
className={errors.telefone && touched.telefone && [style["invalid"]]}
@ -117,9 +123,12 @@ export const Contato = () => {
</div>
<button type="submit">CADASTRE-SE</button>
{isValidateForm && (
<span className={style["success"]}>*Formulario enviado com sucesso!</span>
)}
</Form>
)}
</Formik>
</Article>
</Article >
);
};

View File

@ -15,13 +15,13 @@ export const Routes = () => {
return (
<ReactRouterRoutes>
<Route path="/" element={< Home />}>
< Route path="institucional/sobre" element={<Instituicional />}>
<Route path="sobre" element={<Sobre />} />
<Route path="forma-de-pagamento" element={<FormaDePagamento />} />
<Route path="entrega" element={<Entrega />} />
<Route path="troca-e-devolucao" element={<TrocaEDevolucao />} />
<Route path="seguranca-e-privacidade" element={<SegurancaEPrivacidade />} />
<Route path="contato" element={<Contato />} />
< Route path="/" element={<Instituicional />}>
<Route path="/sobre" element={<Sobre />} />
<Route path="/forma-de-pagamento" element={<FormaDePagamento />} />
<Route path="/entrega" element={<Entrega />} />
<Route path="/troca-e-devolucao" element={<TrocaEDevolucao />} />
<Route path="/seguranca-e-privacidade" element={<SegurancaEPrivacidade />} />
<Route path="/contato" element={<Contato />} />
</Route>
</Route>
</ReactRouterRoutes >

View File

@ -2,7 +2,6 @@ import * as Yup from "yup";
import {
cpfRegex,
dateRegex,
instaRegex,
phoneRegex
} from "./ContactValidations";