From f3e844d4df438cd0a0e76209068f210a9e248cec Mon Sep 17 00:00:00 2001 From: Emmanuel Vitor Date: Wed, 18 Jan 2023 23:14:35 -0300 Subject: [PATCH] fix: corrige erro inicial das rotas do projeto --- .../Header/HeaderDesk/HeaderBottom.tsx | 4 +- .../Header/HeaderDesk/HeaderTop.tsx | 10 ++-- .../Header/HeaderMobile/BurguerMenu.tsx | 4 +- .../Header/HeaderMobile/HeaderMobile.tsx | 4 +- src/components/Layout/index.tsx | 25 ++++++++++ src/components/Layout/styles.module.scss | 50 +++++++++++++++++++ src/pages/Home.tsx | 16 ++---- .../{Instituitional.tsx => index.tsx} | 4 +- src/routes.tsx | 14 ++++-- 9 files changed, 103 insertions(+), 28 deletions(-) create mode 100644 src/components/Layout/index.tsx create mode 100644 src/components/Layout/styles.module.scss rename src/pages/Intitucional/{Instituitional.tsx => index.tsx} (97%) diff --git a/src/components/Header/HeaderDesk/HeaderBottom.tsx b/src/components/Header/HeaderDesk/HeaderBottom.tsx index 75069bb..60f5b8e 100644 --- a/src/components/Header/HeaderDesk/HeaderBottom.tsx +++ b/src/components/Header/HeaderDesk/HeaderBottom.tsx @@ -7,10 +7,10 @@ export const HeaderBottom = () => {
- + Icone de busca
diff --git a/src/components/Layout/index.tsx b/src/components/Layout/index.tsx new file mode 100644 index 0000000..d503a4f --- /dev/null +++ b/src/components/Layout/index.tsx @@ -0,0 +1,25 @@ +import { Outlet } from "react-router-dom" +import { Footer } from "../Footer/Footer" +import { Header } from "../Header/Header" +import { BreadCrumb } from "../BreadCrumb/BreadCreumb" +import styles from "./styles.module.scss" + + + + + +export const Layout = () => { + + + return ( +
+
+ +
+ +
+ +
+
+ ) +} \ No newline at end of file diff --git a/src/components/Layout/styles.module.scss b/src/components/Layout/styles.module.scss new file mode 100644 index 0000000..2cf3823 --- /dev/null +++ b/src/components/Layout/styles.module.scss @@ -0,0 +1,50 @@ +@import "../../variaveis"; + + +.container { + display: flex; + flex-direction: column; + + height: 100%; + overflow: hidden; +} + +.main { + display: flex; + + height: auto; + margin: 0 100px; + + + flex-direction: column; + + @media (min-width: 3000px) { + min-height: 897px; + + } + + @media (max-width:$tablets) { + margin: 0 16px; + // z-index: -9; + + } + + h1 { + text-align: center; + font-family: $font-family; + font-style: normal; + font-weight: 400; + font-size: 24px; + line-height: 28px; + letter-spacing: 0.1em; + text-transform: uppercase; + + color: $color-black1; + + @media (min-width:$full) { + font-size: 48px; + line-height: 56px; + } + + } +} \ No newline at end of file diff --git a/src/pages/Home.tsx b/src/pages/Home.tsx index 3331239..f8af57d 100644 --- a/src/pages/Home.tsx +++ b/src/pages/Home.tsx @@ -1,7 +1,6 @@ -import { Outlet } from "react-router-dom" -import { Footer } from "../components/Footer/Footer" -import { Header } from "../components/Header/Header" -import { BreadCrumb } from "../components/BreadCrumb/BreadCreumb" + + + import styles from "./styles.module.scss" @@ -10,15 +9,10 @@ import styles from "./styles.module.scss" export const Home = () => { + return (
-
- -
- -
- -
+

HOME

) } \ No newline at end of file diff --git a/src/pages/Intitucional/Instituitional.tsx b/src/pages/Intitucional/index.tsx similarity index 97% rename from src/pages/Intitucional/Instituitional.tsx rename to src/pages/Intitucional/index.tsx index c7f3d32..d9012f8 100644 --- a/src/pages/Intitucional/Instituitional.tsx +++ b/src/pages/Intitucional/index.tsx @@ -1,9 +1,9 @@ -import React from "react"; import { NavLink, Outlet } from "react-router-dom"; import styleInstitucional from "./Instituitional.module.scss" -export const Instituitional = () => { +export const Institucional = () => { + return ( <> diff --git a/src/routes.tsx b/src/routes.tsx index 3bdcdf4..7496e6a 100644 --- a/src/routes.tsx +++ b/src/routes.tsx @@ -1,21 +1,25 @@ -import { Routes as ReactRouterRoutes, Route } from "react-router-dom" +import { Routes as ReactRouterRoutes, Route, Navigate } from "react-router-dom" import { Home } from "./pages/Home" import { Contact } from "./pages/Intitucional/Contact" import { Delivery } from "./pages/Intitucional/Delivery" import { FormOfPayment } from "./pages/Intitucional/FormOfPayment" -import { Instituitional } from "./pages/Intitucional/Instituitional" +import { Institucional } from "./pages/Intitucional" import { SecurityAndPrivacy } from "./pages/Intitucional/SecurityAndPrivacy" import { About } from "./pages/Intitucional/About" import { ExchangeAndEvolution } from "./pages/Intitucional/ExchangeAndEvolution" +import { Layout } from "./components/Layout" export const Routes = () => { + + return ( - }> - < Route path="institucional" element={} > + }> + } /> + }> } /> } /> } /> @@ -23,6 +27,8 @@ export const Routes = () => { } /> } /> + + ) -- 2.34.1