refactor: Aplica mudanças gerais no código

This commit is contained in:
Sabrina Miranda 2023-01-16 19:39:49 -03:00
parent 94b1d64fb2
commit 6c896974f8
48 changed files with 110 additions and 79 deletions

View 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 };

View File

@ -1,4 +1,4 @@
@use '../../variables';
@use '../../../variables';
.footer-bottom {
background-color: variables.$black;

View File

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

View File

Before

Width:  |  Height:  |  Size: 8.8 KiB

After

Width:  |  Height:  |  Size: 8.8 KiB

View File

Before

Width:  |  Height:  |  Size: 3.3 KiB

After

Width:  |  Height:  |  Size: 3.3 KiB

View File

Before

Width:  |  Height:  |  Size: 3.9 KiB

After

Width:  |  Height:  |  Size: 3.9 KiB

View File

Before

Width:  |  Height:  |  Size: 4.2 KiB

After

Width:  |  Height:  |  Size: 4.2 KiB

View File

Before

Width:  |  Height:  |  Size: 3.3 KiB

After

Width:  |  Height:  |  Size: 3.3 KiB

View File

Before

Width:  |  Height:  |  Size: 4.3 KiB

After

Width:  |  Height:  |  Size: 4.3 KiB

View File

Before

Width:  |  Height:  |  Size: 4.7 KiB

After

Width:  |  Height:  |  Size: 4.7 KiB

View File

Before

Width:  |  Height:  |  Size: 3.9 KiB

After

Width:  |  Height:  |  Size: 3.9 KiB

View File

Before

Width:  |  Height:  |  Size: 3.6 KiB

After

Width:  |  Height:  |  Size: 3.6 KiB

View File

Before

Width:  |  Height:  |  Size: 8.7 KiB

After

Width:  |  Height:  |  Size: 8.7 KiB

View File

@ -1,4 +1,4 @@
@use '../../variables';
@use '../../../variables';
.footer-menu {
display: flex;

View File

@ -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 = () => {

View File

@ -1,4 +1,4 @@
@use '../../variables';
@use '../../../variables';
.footer-top {
display: flex;

View File

@ -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 = () => {

View File

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

View 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 };

View File

@ -1,4 +1,4 @@
@use '../../variables';
@use '../../../variables';
.header-bottom {
@media (max-width: 1024px) {

View File

@ -1,4 +1,4 @@
@use '../../variables';
@use '../../../variables';
.header-nav-bar {
height: 44px;

View 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 };

View File

@ -1,4 +1,4 @@
@use '../../variables';
@use '../../../variables';
.header-top {
border-bottom: 1px solid variables.$gray-400;

View File

@ -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"]}>

View File

Before

Width:  |  Height:  |  Size: 1.2 KiB

After

Width:  |  Height:  |  Size: 1.2 KiB

View File

Before

Width:  |  Height:  |  Size: 638 B

After

Width:  |  Height:  |  Size: 638 B

View File

Before

Width:  |  Height:  |  Size: 688 B

After

Width:  |  Height:  |  Size: 688 B

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 19 KiB

View File

Before

Width:  |  Height:  |  Size: 799 B

After

Width:  |  Height:  |  Size: 799 B

View File

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

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.9 KiB

View File

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

View File

@ -1,4 +1,4 @@
@use '../../variables';
@use '../../../variables';
.menu-sidebar {
border-right: 1px solid variables.$black;

View File

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

View File

@ -1,4 +1,4 @@
@use '../../../variables';
@use '../../../../variables';
.institucional__content {
width: 100%;

View File

@ -8,6 +8,7 @@
align-items: center;
border-top: 1px solid variables.$black;
border-bottom: 1px solid variables.$black;
padding: 0 100px;
}
&__form {

View File

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

View File

@ -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 />
</>
);
}