refactor: Aplica mudanças gerais no código
18
src/components/Footer/Footer.tsx
Normal file
@ -0,0 +1,18 @@
|
||||
import React from "react";
|
||||
|
||||
import { Newsletter } from "../Newsletter/Newsletter";
|
||||
import { FooterTop } from "./FooterTop/FooterTop";
|
||||
import { FooterBottom } from "./FooterBottom/FooterBottom";
|
||||
|
||||
const Footer = () => {
|
||||
|
||||
return (
|
||||
<>
|
||||
<Newsletter />
|
||||
<FooterTop />
|
||||
<FooterBottom />
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
export { Footer };
|
@ -1,4 +1,4 @@
|
||||
@use '../../variables';
|
||||
@use '../../../variables';
|
||||
|
||||
.footer-bottom {
|
||||
background-color: variables.$black;
|
@ -13,8 +13,8 @@ import imgLogoPayPal from "./assets/PayPal.png";
|
||||
import imgLogoBoleto from "./assets/Boleto.png";
|
||||
import imgLogoVtexPCI from "./assets/vtex-pci-200.png";
|
||||
|
||||
import { IconList } from "../IconList/IconList";
|
||||
import { ItemList } from "../ItemList/ItemList";
|
||||
import { IconList } from "../../IconList/IconList";
|
||||
import { ItemList } from "../../ItemList/ItemList";
|
||||
|
||||
const FooterBottom = () => {
|
||||
return (
|
Before Width: | Height: | Size: 8.8 KiB After Width: | Height: | Size: 8.8 KiB |
Before Width: | Height: | Size: 3.3 KiB After Width: | Height: | Size: 3.3 KiB |
Before Width: | Height: | Size: 3.9 KiB After Width: | Height: | Size: 3.9 KiB |
Before Width: | Height: | Size: 4.2 KiB After Width: | Height: | Size: 4.2 KiB |
Before Width: | Height: | Size: 3.3 KiB After Width: | Height: | Size: 3.3 KiB |
Before Width: | Height: | Size: 4.3 KiB After Width: | Height: | Size: 4.3 KiB |
Before Width: | Height: | Size: 4.7 KiB After Width: | Height: | Size: 4.7 KiB |
Before Width: | Height: | Size: 3.9 KiB After Width: | Height: | Size: 3.9 KiB |
Before Width: | Height: | Size: 3.6 KiB After Width: | Height: | Size: 3.6 KiB |
Before Width: | Height: | Size: 8.7 KiB After Width: | Height: | Size: 8.7 KiB |
@ -1,4 +1,4 @@
|
||||
@use '../../variables';
|
||||
@use '../../../variables';
|
||||
|
||||
.footer-menu {
|
||||
display: flex;
|
@ -2,7 +2,7 @@ import {useState} from "react";
|
||||
|
||||
import styles from "./FooterMenu.module.scss";
|
||||
|
||||
import { ItemList } from "../ItemList/ItemList";
|
||||
import { ItemList } from "../../ItemList/ItemList";
|
||||
|
||||
const FooterMenu = () => {
|
||||
|
@ -1,4 +1,4 @@
|
||||
@use '../../variables';
|
||||
@use '../../../variables';
|
||||
|
||||
.footer-top {
|
||||
display: flex;
|
@ -2,7 +2,7 @@ import React from "react";
|
||||
|
||||
import styles from "./FooterTop.module.scss";
|
||||
|
||||
import { RedesSociais } from "../RedesSociais/RedesSociais";
|
||||
import { RedesSociais } from "../../RedesSociais/RedesSociais";
|
||||
import { FooterMenu } from "../FooterMenu/FooterMenu";
|
||||
|
||||
const FooterTop = () => {
|
@ -2,9 +2,9 @@ import {useState} from "react";
|
||||
|
||||
import { Formik, Form, Field, ErrorMessage, FormikHelpers} from "formik";
|
||||
|
||||
import styles from "./InstitucionalForm.module.scss";
|
||||
import styles from "./RegistrationForm.module.scss";
|
||||
|
||||
import FormSchema from "./Schema/InstitucionalFormSchema";
|
||||
import RegistrationFormSchema from "./Schema/RegistrationFormSchema";
|
||||
|
||||
interface FormValue {
|
||||
name: string;
|
||||
@ -28,7 +28,7 @@ const initialValue = {
|
||||
|
||||
let listClient: Array<FormValue> = [];
|
||||
|
||||
const InstitucionalForm = () => {
|
||||
const RegistrationForm = () => {
|
||||
|
||||
const [successMessage, setSuccessMessage] = useState(false);
|
||||
|
||||
@ -46,7 +46,7 @@ const InstitucionalForm = () => {
|
||||
<Formik
|
||||
onSubmit={handleSubmit}
|
||||
initialValues={initialValue}
|
||||
validationSchema={FormSchema} >
|
||||
validationSchema={RegistrationFormSchema} >
|
||||
|
||||
{({errors, touched}) => (
|
||||
<Form>
|
||||
@ -185,4 +185,4 @@ const InstitucionalForm = () => {
|
||||
);
|
||||
};
|
||||
|
||||
export { InstitucionalForm };
|
||||
export { RegistrationForm };
|
16
src/components/Header/Header.tsx
Normal file
@ -0,0 +1,16 @@
|
||||
import React from "react";
|
||||
|
||||
import { HeaderTop } from "./HeaderTop/HeaderTop";
|
||||
import { HeaderBottom } from "./HeaderBottom/HeaderBottom";
|
||||
|
||||
const Header = () => {
|
||||
|
||||
return (
|
||||
<>
|
||||
<HeaderTop />
|
||||
<HeaderBottom />
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
export { Header };
|
@ -1,4 +1,4 @@
|
||||
@use '../../variables';
|
||||
@use '../../../variables';
|
||||
|
||||
.header-bottom {
|
||||
@media (max-width: 1024px) {
|
@ -1,4 +1,4 @@
|
||||
@use '../../variables';
|
||||
@use '../../../variables';
|
||||
|
||||
.header-nav-bar {
|
||||
height: 44px;
|
36
src/components/Header/HeaderNavBar/HeaderNavBar.tsx
Normal file
@ -0,0 +1,36 @@
|
||||
import React from "react";
|
||||
|
||||
import styles from "./HeaderNavBar.module.scss";
|
||||
|
||||
import { ItemList } from "../../ItemList/ItemList";
|
||||
|
||||
const HeaderNavBar = () => {
|
||||
return (
|
||||
<nav className={styles["header-nav-bar"]}>
|
||||
<ul className={styles["header-nav-bar__ul"]}>
|
||||
<a href="/">
|
||||
<ItemList
|
||||
textClassName={styles["header-nav-bar__item"]}
|
||||
text="cursos"
|
||||
/>
|
||||
</a>
|
||||
|
||||
<a href="/">
|
||||
<ItemList
|
||||
textClassName={styles["header-nav-bar__item"]}
|
||||
text="Saiba mais"
|
||||
/>
|
||||
</a>
|
||||
|
||||
<a href="/">
|
||||
<ItemList
|
||||
textClassName={styles["header-nav-bar__item"]}
|
||||
text="Institucionais"
|
||||
/>
|
||||
</a>
|
||||
</ul>
|
||||
</nav>
|
||||
);
|
||||
};
|
||||
|
||||
export { HeaderNavBar };
|
@ -1,4 +1,4 @@
|
||||
@use '../../variables';
|
||||
@use '../../../variables';
|
||||
|
||||
.header-top {
|
||||
border-bottom: 1px solid variables.$gray-400;
|
@ -2,7 +2,7 @@ import { useState, useEffect, useRef } from "react";
|
||||
|
||||
import styles from "./HeaderTop.module.scss";
|
||||
|
||||
import imgLogo from "./assets/logo-m3academy.png";
|
||||
import imgLogo from "./assets/logo-m3academy.svg";
|
||||
import imgCart from "./assets/cart.svg";
|
||||
import imgSearch from "./assets/search.svg";
|
||||
import imgHamburgerBtn from "./assets/hamburger-menu-btn-icon.svg";
|
||||
@ -59,7 +59,7 @@ const HeaderTop = () => {
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<HeaderNavBar />
|
||||
<HeaderNavBar />
|
||||
</div>
|
||||
|
||||
<picture className={styles["header-top__logo"]}>
|
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 1.2 KiB |
Before Width: | Height: | Size: 638 B After Width: | Height: | Size: 638 B |
Before Width: | Height: | Size: 688 B After Width: | Height: | Size: 688 B |
After Width: | Height: | Size: 19 KiB |
Before Width: | Height: | Size: 799 B After Width: | Height: | Size: 799 B |
@ -1,28 +0,0 @@
|
||||
import React from "react";
|
||||
|
||||
import styles from "./HeaderNavBar.module.scss";
|
||||
|
||||
import { ItemList } from "../ItemList/ItemList";
|
||||
|
||||
const HeaderNavBar = () => {
|
||||
return (
|
||||
<nav className={styles["header-nav-bar"]}>
|
||||
<ul className={styles["header-nav-bar__ul"]}>
|
||||
<ItemList
|
||||
textClassName={styles["header-nav-bar__item"]}
|
||||
text="cursos"
|
||||
/>
|
||||
<ItemList
|
||||
textClassName={styles["header-nav-bar__item"]}
|
||||
text="Saiba mais"
|
||||
/>
|
||||
<ItemList
|
||||
textClassName={styles["header-nav-bar__item"]}
|
||||
text="Institucionais"
|
||||
/>
|
||||
</ul>
|
||||
</nav>
|
||||
);
|
||||
};
|
||||
|
||||
export { HeaderNavBar };
|
Before Width: | Height: | Size: 2.9 KiB |
@ -8,9 +8,7 @@ import imgArrowToRight from "./assets/arrow-point-to-right.svg";
|
||||
import { IconList } from "../IconList/IconList";
|
||||
import { ItemList } from "../ItemList/ItemList";
|
||||
|
||||
import { TitlePrincipal } from "../TitlePrincipal/TitlePrincipal";
|
||||
import { InstitucionalRoutes } from "../Routes/InstitucionalRoutes";
|
||||
|
||||
import { InstitucionalRoutes } from "./Routes/InstitucionalRoutes";
|
||||
|
||||
const Main = () => {
|
||||
|
||||
@ -38,7 +36,7 @@ const Main = () => {
|
||||
</a>
|
||||
</ul>
|
||||
|
||||
<TitlePrincipal text="Institucional" titleClassName={styles["institucional__title-principal"]}/>
|
||||
<h1 className={styles["institucional__title-principal"]}>Institucional</h1>
|
||||
|
||||
<div className={styles["institucional__principal-content"]}>
|
||||
<InstitucionalRoutes />
|
||||
|
@ -1,4 +1,4 @@
|
||||
@use '../../variables';
|
||||
@use '../../../variables';
|
||||
|
||||
.menu-sidebar {
|
||||
border-right: 1px solid variables.$black;
|
@ -1,16 +1,16 @@
|
||||
import React from "react";
|
||||
|
||||
import { InstitucionalForm } from "../../InstitucionalForm/InstitucionalForm";
|
||||
|
||||
import styles from "./RoutesPages.module.scss";
|
||||
|
||||
import { RegistrationForm } from "../../../Form/RegistrationForm";
|
||||
|
||||
const Contato = () => {
|
||||
|
||||
return (
|
||||
<section className={styles["institucional__content"]}>
|
||||
<h2 className={styles["institucional__content__title"]}>Preencha o Formulário </h2>
|
||||
|
||||
<InstitucionalForm />
|
||||
<RegistrationForm />
|
||||
</section>
|
||||
);
|
||||
}
|
@ -1,4 +1,4 @@
|
||||
@use '../../../variables';
|
||||
@use '../../../../variables';
|
||||
|
||||
.institucional__content {
|
||||
width: 100%;
|
@ -8,6 +8,7 @@
|
||||
align-items: center;
|
||||
border-top: 1px solid variables.$black;
|
||||
border-bottom: 1px solid variables.$black;
|
||||
padding: 0 100px;
|
||||
}
|
||||
|
||||
&__form {
|
||||
|
@ -1,14 +0,0 @@
|
||||
import React from "react";
|
||||
|
||||
interface Title {
|
||||
text: string;
|
||||
titleClassName?: string;
|
||||
}
|
||||
|
||||
const TitlePrincipal = ( props: Title) => {
|
||||
const { text, titleClassName } = props;
|
||||
|
||||
return <h1 className={titleClassName}> { text } </h1>;
|
||||
};
|
||||
|
||||
export { TitlePrincipal };
|
@ -2,12 +2,9 @@ import React from "react";
|
||||
|
||||
import styles from "./Home.module.scss";
|
||||
|
||||
import { HeaderTop } from "../components/HeaderTop/HeaderTop";
|
||||
import { HeaderBottom } from "../components/HeaderBottom/HeaderBottom";
|
||||
import { Header } from "../components/Header/Header";
|
||||
import { Main } from "../components/Main/Main";
|
||||
import { Newsletter } from "../components/Newsletter/Newsletter";
|
||||
import { FooterTop } from "../components/FooterTop/FooterTop";
|
||||
import { FooterBottom } from "../components/FooterBottom/FooterBottom";
|
||||
import { Footer } from "../components/Footer/Footer";
|
||||
import { WhatsAppAndScrollTop } from "../components/WhatsAppAndScrollTop/WhatsAppAndScrollTop";
|
||||
|
||||
const Home = () => {
|
||||
@ -15,8 +12,7 @@ const Home = () => {
|
||||
return (
|
||||
<>
|
||||
<header className={styles["header"]}>
|
||||
<HeaderTop />
|
||||
<HeaderBottom />
|
||||
<Header />
|
||||
</header>
|
||||
|
||||
<main className={styles["institucional"]}>
|
||||
@ -24,11 +20,10 @@ const Home = () => {
|
||||
</main>
|
||||
|
||||
<footer>
|
||||
<Newsletter />
|
||||
<FooterTop />
|
||||
<FooterBottom />
|
||||
<WhatsAppAndScrollTop />
|
||||
<Footer />
|
||||
</footer>
|
||||
|
||||
<WhatsAppAndScrollTop />
|
||||
</>
|
||||
);
|
||||
}
|
||||
|